Web: Fix matching for youtube

This commit is contained in:
Valentin Lorentz 2022-04-04 23:29:47 +02:00
parent 21ea999e3c
commit eb6fc932d9

View File

@ -151,7 +151,8 @@ class Web(callbacks.PluginRegexp):
size = conf.supybot.protocols.http.peekSize() size = conf.supybot.protocols.http.peekSize()
parsed_url = utils.web.urlparse(url) parsed_url = utils.web.urlparse(url)
if parsed_url.netloc.endswith(('youtube.com', '.youtube.com')): if parsed_url.netloc == 'youtube.com' \
or parsed_url.netloc.endswith(('.youtube.com')):
# there is a lot of Javascript before the <title> # there is a lot of Javascript before the <title>
size = 409600 size = 409600
if parsed_url.netloc in ('reddit.com', 'www.reddit.com', 'new.reddit.com'): if parsed_url.netloc in ('reddit.com', 'www.reddit.com', 'new.reddit.com'):