[英]How do I see which python loggers have been created by the logging module?
[英]Hello friends, I want to separate a few emails to see which ones have been created and which ones have not been created yet
看到这个:
import requests
from bs4 import BeautifulSoup
list1 = []
for i in range(0, 1000):
user = "haji1" + str(i) + "7"
if len(user) == 7:
user = user[:5] + "00" + user[5:]
elif len(user) == 8:
user = user[:5] + "0" + user[5:]
list1.append(user + "@gmail.come")
req = requests.get(
"https://accounts.google.com/signin/v2/identifier?hl\
=en&continue=https%\3A%\2F%\2Fmail.google.com%\2Fmail&servi\
ce=mail&flowName=GlifWebSignIn&flowEntry=AddSession"
)
soup = BeautifulSoup(req, "html.parser")
print(soup)
Traceback (most recent call last):
File "c:/Users/MR/Desktop/tekrar1.py", line 14, in <module>
soup=BeautifulSoup(req,'html.parser')
File "C:\Users\MR\AppData\Local\Programs\Python\Python38-32\lib\site-packages\bs4\__init__.py", line 287, in __init__
elif len(markup) <= 256 and (
TypeError: object of type 'Response' has no len()
我不确定您的代码最终应该做什么(请记住,自动请求是让您被 Google 屏蔽的万无一失的方法),但您只是错过了对响应文本的访问权限:
resp = requests.get("https://accounts.google.com/signin/v2/identifier...")
resp.raise_for_status() # raise an exception if there was an error
soup = BeautifulSoup(resp.text, "html.parser") # see "resp.text"
print(soup)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.