Commit a7449b31 authored by Fedor Shabashev's avatar Fedor Shabashev Committed by GitHub

Fix username error (#735)

* fixing not working example in README.md

* fixing error when username is not found

* revert README.md
parent b8805a02
...@@ -167,6 +167,8 @@ class Twint: ...@@ -167,6 +167,8 @@ class Twint:
logme.debug(__name__+':Twint:main:username') logme.debug(__name__+':Twint:main:username')
url = f"https://twitter.com/{self.config.Username}?lang=en" url = f"https://twitter.com/{self.config.Username}?lang=en"
self.config.User_id = await get.User(url, self.config, self.conn, True) self.config.User_id = await get.User(url, self.config, self.conn, True)
if self.config.User_id is None:
raise ValueError("Cannot find twitter account with name = " + self.config.Username)
if self.config.TwitterSearch and self.config.Since and self.config.Until: if self.config.TwitterSearch and self.config.Since and self.config.Until:
logme.debug(__name__+':Twint:main:search+since+until') logme.debug(__name__+':Twint:main:search+since+until')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment