import json
import requests
from bs4 import BeautifulSoup
headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36'}
data={'form':'news_webapp',
'pd':'webapp',
'os':'android',
'ver':6,
'category_name':'汽车',
'category_id':'',
'action':0,
'display_time':1559091497963,
'mid':'110B561D1D1B9ABD25614852D9CA61CD:FG=1'}
urls='https://news.baidu.com/sn/api/feed_channellist'
res=requests.post(urls,data=data,headers=headers)
js=json.loads(res.text)
if data and 'data' in js.keys():
for link in js.get('data'):
print link.get('news')