# coding:utf-8
import requests
import json
url = 'https://www.toutiao.com/search/suggest/hot_words/?_signature=_02B4Z6wo00101KzVDhQAAIDALNf0VpZzQrys8QqAAE.4WWTkOuz1HeMqTrJvEm2yLbAnK-d4x0dPsUEaw146LG7XljEYM0cn9I0bjErwG0PJkn2Kj0dDPMvau3aciANleL.uixoTYSMyqkyd78'
wbdata = requests.get(url).text
print(wbdata)
data = json.loads(wbdata)
print (data)
news = data['data']
for n in news:
title = n['query']
id = n['query_id']
str = n['query_id_string']
print(id,title,str)
7259265922321732923 大运会因颜值出圈的选手 7259265922321732923
7259608747588326716 曹茂园再夺金 7259608747588326716
7260730871030961423 乌克兰更改圣诞节日期 7260730871030961423
7259762963610850571 曹茂园男子南拳夺冠 7259762963610850571
7259283186713744699 蓉宝大型蹦迪现场 7259283186713744699
7042557061888890143 唐钱婷打破亚洲纪录 7042557061888890143
7259609992441009445 菲律宾男篮主帅谈李凯尔 7259609992441009445
7148428370782917892 2023年居民医保筹资标准 7148428370782917892
7259346668424074552 官方通报安平县爆燃事故 7259346668424074552
7260657121313461544 毕业后医保该怎么办 7260657121313461544
标签:7259609992441009445,wbdata,网页,渲染,爬虫,print,query,data,id From: https://blog.51cto.com/576642026/6901384