2016-08-23 2 views
2

タグを越えて美しいスープを使用する可能性はありますか?場合によっては、次のページになります。美しいスープを超えて使用</html>

http://dsalsrv02.uchicago.edu/cgi-bin/app/biswas-bangala_query.py?page=1 

htmlタグの後にデータがあります。

答えて

0

私が見たものから、あなたは、この特定のページにhtml.parser orhtml5libを使用することができ、次のいずれか

import requests 
from bs4 import BeautifulSoup 

response = requests.get("http://dsalsrv02.uchicago.edu/cgi-bin/app/biswas-bangala_query.py?page=1") 

soup = BeautifulSoup(response.content, "html.parser") 
# soup = BeautifulSoup(response.content, "html5lib") 

lxmlパーサはよくこのページを処理しないと、それは部分的にしか解析されます。

関連する問題