Update 'gen_tdp'

If ahriman's site freaks out, then don't crash. Otherwise, crash.
This commit is contained in:
Robert Miles 2019-11-25 10:45:32 -05:00
parent e568b7f1b0
commit c8b2789567
1 changed files with 5 additions and 1 deletions

6
gen_tdp Executable file → Normal file
View File

@ -17,7 +17,11 @@ for user in users:
if user=="asm":
continue
tdpuser = dict(username=user)
title = bs(requests.get("https://tilde.team/~{}".format(user)).text,"lxml").title
try:
title = bs(requests.get("https://tilde.team/~{}".format(user)).text,"lxml").title
except:
if user=="ahriman": pass
else: raise
if title is None:
title = "No title"
else: