[bilibili] Restrict cid regex (closes #16638, closes #16734)
authorSergey M․ <dstftw@gmail.com>
Thu, 14 Jun 2018 15:40:30 +0000 (22:40 +0700)
committerSergey M․ <dstftw@gmail.com>
Thu, 14 Jun 2018 15:40:30 +0000 (22:40 +0700)
youtube_dl/extractor/bilibili.py

index 3e3348ef5baed8f6e9a31634778421c921e352ce..4d6b051fe102256f1733c99e6d42697324948c8f 100644 (file)
@@ -114,7 +114,7 @@ class BiliBiliIE(InfoExtractor):
 
         if 'anime/' not in url:
             cid = self._search_regex(
-                r'cid(?:["\']:|=)(\d+)', webpage, 'cid',
+                r'\bcid(?:["\']:|=)(\d+)', webpage, 'cid',
                 default=None
             ) or compat_parse_qs(self._search_regex(
                 [r'EmbedPlayer\([^)]+,\s*"([^"]+)"\)',