twitter-scraper icon indicating copy to clipboard operation
twitter-scraper copied to clipboard

DeprecationWarning: invalid escape sequence \g

Open d9pouces opened this issue 4 years ago • 0 comments

There are still invalid escape sequences in tweets.py, that could raise errors in a future Python version:

twitter_scraper/modules/tweets.py:161: DeprecationWarning: invalid escape sequence \g tweet["text"] = re.sub(r"(\S)http", "\g<1> http", tweet["text"], 1)

twitter_scraper/modules/tweets.py:163: DeprecationWarning: invalid escape sequence \g r"(\S)pic.twitter", "\g<1> pic.twitter", tweet["text"], 1

d9pouces avatar Jan 23 '21 10:01 d9pouces