mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-03-27 16:06:46 +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
|
# Replace twit_account with version with correct capitalization
|
||||||
ta = soup.find('meta', property='og:title').get('content')
|
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)
|
print(twit_account)
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user