我正试图从这个链接中获取股票信息:https://www.affarsvarlden.se/bors/kurslistor/stockholm-large/kurs/
在python中,它可以很好地使用requests
处理前100行,但是剩余的行隐藏在pagination元素下。问题是我怎样才能得到这些。困难的是,第二个页面(包含剩余行)的链接与第一个页面的链接相同,并且在“开发人员工具”的“网络”选项卡中查看时,在这两个页面之间进行更改时,我看不到有任何请求。有没有办法使用requests
模块来实现这一点,或者我需要使用类似selenium
的东西?我也不能让后者工作
我非常感谢您的任何意见
你可以用硒来做这个。下面的脚本将打开网页并转到下一页
编辑:您的工作目录中需要chromedriver.exe才能使用webdriver
据我所知,所有的数据已经上传到页面时,请求页面。所以,你可以试试这个
相关问题 更多 >
编程相关推荐