抖音热搜榜

整理于2020年10月下旬,献给不甘平凡的你

更多企业级爬虫知识请查收于:https://blog.csdn.net/weixin_45316122/article/details/109840745

Trick:纯demo,心在哪里,结果就在那里

随手代码小实验

import requests
import pprint
# 抖音热搜榜
hot_search = 'https://aweme-hl.snssdk.com/aweme/v1/hot/search/list/?detail_list=1'
headers = {"User-Agent":"Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Mobile Safari/537.36"}
hot_json = requests.get(hot_search,headers=headers).json()
hot_list = []
for data in hot_json['data']['word_list']:
    item = {}
    item['position'] = data['position']
    item['title'] =data['word']
    item['hot_value'] =data['hot_value']

    hot_list.append(item)
pprint.pprint(hot_list)

猜你喜欢

转载自blog.csdn.net/weixin_45316122/article/details/107228120