Fix Twitter username length limit

Although 15 characters is the official, current limit, there are accounts with longer usernames. 20 is the longest observed example, but it's unclear what the true limit is.
This commit is contained in:
JustAnotherArchivist
2022-12-03 06:36:52 +00:00
parent 46a603053c
commit e09aea70e7

View File

@@ -1539,7 +1539,7 @@ class TwitterUserScraper(TwitterSearchScraper):
@staticmethod
def is_valid_username(s):
return 1 <= len(s) <= 15 and s.strip(string.ascii_letters + string.digits + '_') == ''
return 1 <= len(s) <= 20 and s.strip(string.ascii_letters + string.digits + '_') == ''
@classmethod
def _cli_setup_parser(cls, subparser):