[extractor] escape forgotten dot for hostnames in regular expression (#28530)
authorThe Hatsune Daishi <nao20010128@gmail.com>
Wed, 24 Mar 2021 14:33:19 +0000 (23:33 +0900)
committerGitHub <noreply@github.com>
Wed, 24 Mar 2021 14:33:19 +0000 (14:33 +0000)
youtube_dl/extractor/generic.py
youtube_dl/extractor/mtv.py

index c2b1b3bdfef5b68e7400e0bfe265fadd651d8615..f99d887cafe8c542804595372efcca9712aa0624 100644 (file)
@@ -2953,7 +2953,7 @@ class GenericIE(InfoExtractor):
             webpage)
         if not mobj:
             mobj = re.search(
-                r'data-video-link=["\'](?P<url>http://m.mlb.com/video/[^"\']+)',
+                r'data-video-link=["\'](?P<url>http://m\.mlb\.com/video/[^"\']+)',
                 webpage)
         if mobj is not None:
             return self.url_result(mobj.group('url'), 'MLB')
index f5e30d22d420006eccfa5e5b29409fd93ffc0ec2..600cf2d89bcf8288c62d774f62858b5b0d3ef391 100644 (file)
@@ -320,7 +320,7 @@ class MTVServicesEmbeddedIE(MTVServicesInfoExtractor):
     @staticmethod
     def _extract_url(webpage):
         mobj = re.search(
-            r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//media.mtvnservices.com/embed/.+?)\1', webpage)
+            r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//media\.mtvnservices\.com/embed/.+?)\1', webpage)
         if mobj:
             return mobj.group('url')