mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-01-18 15:27:07 +00:00
Safer implementation
This commit is contained in:
parent
e2841535f6
commit
910b7a8b13
5
twoot.py
5
twoot.py
|
@ -229,7 +229,10 @@ def main(argv):
|
|||
|
||||
# Replace twit_account with version with correct capitalization
|
||||
ta = soup.find('meta', property='og:title').get('content')
|
||||
twit_account = re.search('\(@(.+)\)', ta).group(1)
|
||||
ta_match = re.search('\(@(.+)\)', ta)
|
||||
if ta_match is not None:
|
||||
twit_account = ta_match.group(1)
|
||||
|
||||
print(twit_account)
|
||||
exit(0)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user