通常我可以编写一个脚本,用于抓取,但我一直在抓这个网站的表格为我正在研究这个研究项目。我打算在输入我的目标状态的URL之前验证在一个国家工作的脚本。问题与BS4刮去网站
import requests
import bs4 as bs
url = ("http://programs.dsireusa.org/system/program/detail/284")
dsire_get = requests.get(url)
soup = bs.BeautifulSoup(dsire_get.text,'lxml')
table = soup.findAll('div', {'data-ng-controller': 'DetailsPageCtrl'})
print(table)
#I'm printing "Table" just to ensure that the table information I'm looking for is within this sections
我不知道,如果该网站试图从刮阻止的人,但所有我正在寻找抢的信息是“QUOT &”内,如果你的样子表输出。
你试过'html.parser'而不是'lxml'吗? – martinB0103
你想要哪个页面的哪一部分?以“计划概述”为主题的部分?还是那个以“权威”为主的?或者是其他东西? –
@BillBell我正在寻找“程序概述” – vlepore