Update gen_tdp

Added features=xml to fix python warnings.
This commit is contained in:
deepend-tildeclub 2023-01-16 11:35:17 -07:00 committed by GitHub
parent d28b3c4041
commit 7d82a258c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -17,10 +17,10 @@ for user in users:
tdpuser = dict(username=user)
try:
title = bs(
requests.get(f"http://tilde.club/~{user}/", allow_redirects=False).text,
"lxml",
).title.text
title = bs(
requests.get(f"http://tilde.club/~{user}/", allow_redirects=False).text,
"lxml", features='xml'
).title.text
except:
title = "No title"
tdpuser["title"] = title
@ -36,4 +36,3 @@ tdp["users"] = tdpusers
with open("tilde.json", "w") as f:
json.dump(tdp, f)