fix titles with react attributes

This commit is contained in:
Context 77
2024-08-01 13:49:37 +02:00
parent 0ad43684a8
commit cab4113a86

View File

@@ -53,7 +53,7 @@ class TitleObserver(PrivMsgObserverPrototype):
'''"results":{"contents":\[{"videoPrimaryInfoRenderer":{"title":{"runs":\[{"text":"([^"]*)"'''
)
else:
title_re = re.compile("<title>(.+?)</title>")
title_re = re.compile("<title[^>]*>(.+?)</title>")
req = urllib.request.Request(url, None, headers)