我想登录到 facebook messenger 并解析 HTML。
import requests
from bs4 import BeautifulSoup
import webbrowser
page = requests.get("https://www.messenger.com", auth=
('username', 'password'))
soup = BeautifulSoup(page, 'html.parser')
print(soup)
我从另一个堆栈问题中得到了这个,但它向我抛出了这个错误:
File "C:/Code/Beautiful Soup Web Scraping.py", line 7, in <module>
soup = len(BeautifulSoup(page, 'html.parser'))
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python37\lib\site-packages\bs4\__init__.py", line 246, in __init__
elif len(markup) <= 256 and (
TypeError: object of type 'Response' has no len()
我怎样才能让它发挥作用?
蝴蝶刀刀
GCT1015
相关分类