我想在下面的网站上执行scraping,一个案例库:https://engagements.ceres.org/?_ga=2.157917299.852607976.1552678391-697747477.1552678391
要提取的特征包括:
'Organization', "Industry","Title", "Filed_By", 'Status, Year','Summary'(main body text)
我的问题是,我该如何处理每个案例,并让程序在所有页面中循环?你知道吗
我的代码中的URL只是第一种情况,但我需要遍历存储库中的所有页面(88页)并将它们写入CSV
我想知道在这种情况下使用lambda是否有效
也可以有人善意地提出一些关于如何理解和识别html标签中的模式,以供将来使用,因为我是这个领域的新手。你知道吗
下面的代码是我目前拥有的:
url = "https://engagements.ceres.org/ceres_engagementdetailpage?recID=a0l1H00000CDy78QAD"
page = requests.get(url, verify=False)
soup = BeautifulSoup(page.text, 'html.parser')
我认为你需要将bs和selenium结合起来,因为有些内容的加载有点慢。您可以使用bs来获取初始链接,然后使用selenium和waits来确保加载每个页面上的内容。您需要首先处理证书问题。你知道吗
我不知道什么是摘要,所以我提供了所有的p标签。这意味着一些重复的信息。你可以改进这个。你知道吗
相关问题 更多 >
编程相关推荐