我想爬取百度的招聘信息。
我是从https://talent.baidu.com/external/baidu/index.html#/social/2进去
我的程序是这么写的
import urllib
import urllib.request
from bs4 import BeautifulSoup
import json
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36'}
url = r'https://talent.baidu.com/baidu/web/httpservice/getPostList?postType=&workPlace=0%2F4%2F7%2F9&recruitType=2&keyWord=&pageSize=10&curPage=1&_=1582258750815'
url2 = r'https://talent.baidu.com/external/baidu/index.html#/social/2'
re = urllib.request.Request(url,headers = headers)
info = urllib.request.urlopen(re).read().decode()
# print(info)
soup = BeautifulSoup(info,'lxml')
print(soup.prettify())
但是我得到的信息是这样的
看不到标签和属性,我不是知道怎么去提取信息.
哪一位大神可以帮忙看看!谢谢