drugs, urlinfo, youtube: fix 'invalid escape sequence' SyntaxWarnings

This commit is contained in:
jkhsjdhjs 2024-06-02 15:30:20 +00:00
parent 6986798245
commit 586a109a16
3 changed files with 7 additions and 7 deletions

View File

@ -113,4 +113,4 @@ class Drugs(Plugin):
%%meth [<nick>]
"""
self.bot.action(target, 'legt {} eine dicke Line Meth \________'.format(args.get('<nick>', mask.nick)))
self.bot.action(target, r'legt {} eine dicke Line Meth \________'.format(args.get('<nick>', mask.nick)))

View File

@ -9,11 +9,11 @@ from . import Plugin
class URLInfo(Plugin):
BLACKLIST = [
"^https?:\/\/(?:www\.)?youtube\.com",
"^https?:\/\/youtu\.be",
"^https?:\/\/w0bm\.com",
"^https?:\/\/f0ck\.me",
"^https?:\/\/(?:(?:vid|img|thumb)\.)?pr0gramm\.com"
r"^https?:\/\/(?:www\.)?youtube\.com",
r"^https?:\/\/youtu\.be",
r"^https?:\/\/w0bm\.com",
r"^https?:\/\/f0ck\.me",
r"^https?:\/\/(?:(?:vid|img|thumb)\.)?pr0gramm\.com"
]
# set the size limit to 2 MB so we don't fully download too large resources

View File

@ -29,7 +29,7 @@ class YouTube(Plugin):
item = data['items'][0]
date = date_from_iso(item['snippet']['publishedAt'])
length = re.findall('(\d+[DHMS])', item['contentDetails']['duration'])
length = re.findall(r'(\d+[DHMS])', item['contentDetails']['duration'])
views = int(item['statistics'].get('viewCount', 0))
likes = int(item['statistics'].get('likeCount', 0))