【发布时间】:2018-02-15 00:16:34
【问题描述】:
在第一页上输入包裹代码后,我试图在网站上获取 html 代码。但是,下面的代码不起作用。我得到的只是https://treasurer.maricopa.gov/主页的HTML打印输出
输入504-27-095等包裹号后如何让python打印网站的结果?我需要结果页面中的 HTML。下面是我的代码。
import requests
payload = {'txtParcelNumBook': '504', 'txtParcelNumMap': '27', 'txtParcelNumItem': '095', 'txtParcelNumSplit' : ''}
website = "https://treasurer.maricopa.gov/"
r = requests.post(website, data=payload)
print (r.text)
【问题讨论】:
标签: html python-3.x web-scraping python-requests