我关注了以前在stackoverflow上遇到的一些问题,但没有一个能完全解决我的问题
我正在尝试建立一个硬币拍卖网站。我能够动态地从网页上抓取第一个页面,但无法从网页上抓取其余页面
我遵循urlHow to scrape multiple pages with an unchanging URL - Python 3中提到的步骤
在TodyWall拍卖中,我们没有上面示例中提到的表单数据
当我们更改页面但没有页面索引信息时,它会访问URLhttps://www.todywallaauctions.com/Results.aspx/getSearchResult
我应该使用什么URL访问第二个页面
此页面使用
JavaScript
,它使用urlgetSearchResult
从服务器加载XML
,然后生成HTML并在页面上替换。所以最后你们会看到第二个页面,但这个页面并没有自己的URL,也并没有完整的HTML您必须创建到url
getSearchResult
的POST
请求,并在JSON数据中以'pageTop'
的形式发送页码,类似于它将返回
JSON
数据,其中一个字段"d"
包含XML
和所有数据。然后可以使用BeautifulSoup
或lxml
在XML
中搜索数据顺便说一句:带有
XML
的文本的名称带有一些大写字符,比如ShortDesc
,但代码需要小写字符shortdesc
结果:
编辑:此代码可以下载图像
相关问题 更多 >
编程相关推荐