好友
阅读权限10
听众
最后登录1970-1-1
|
请哪位大神帮忙解惑,以下这段代码,想抓取第4页的表格,但只能抓取第一页,不知问题出在哪儿?非常感谢!
import requests
from bs4 import BeautifulSoup
def get_data(url):
formdata = {
"examId":5461,
"enrollBatch":"",
"province":"",
"schoolName":"",
"examId2":5461,
"enrollBatch2":"",
"specialtyName":"",
"kskmgx":0,
"optionType":1,
"queryType":1,
"pageFalg":"true",
"pageSize":"50",
"pageNo":4
}
r = requests.post(url,data = formdata)
soup = BeautifulSoup(r.text,'lxml')
print(soup)
if __name__ == "__main__":
url = 'http://query.bjeea.cn/queryService/rest/plan/115'
get_data(url)
|
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|