Tik Tok Hot Search

Organized in late October 2020, dedicated to you who are unwilling to be ordinary

For more enterprise-level crawler knowledge, please check: https://blog.csdn.net/weixin_45316122/article/details/109840745

Trick: Pure demo, where the heart is, the result is there

 

Handy code experiment

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)

 

Guess you like

Origin blog.csdn.net/weixin_45316122/article/details/107228120