Update sweebot.py

This commit is contained in:
Swee 2024-11-11 16:53:43 -08:00
parent e3426ef2ae
commit 0af5f1b9a1

View file

@ -609,6 +609,9 @@ while True:
if i[:8] == "https://":
try:
e = get(i, headers=headers, timeout=10)
header = e.headers
content_type = header.get('content-type')
content_len = header.get('Content-length')
if content_type in allowedparse:
if e.ok:
soup = BeautifulSoup(e.text, 'html.parser')