# 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)
爬虫:动态渲染网页
原创
©著作权归作者所有:来自51CTO博客作者帅枫小明的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇: 模型定义
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章