Browse Source

[extractor] escape forgotten dot for hostnames in regular expression (#28530)

The Hatsune Daishi 4 năm trước cách đây
mục cha
commit
eafcadea26
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      youtube_dl/extractor/generic.py
  2. 1 1
      youtube_dl/extractor/mtv.py

+ 1 - 1
youtube_dl/extractor/generic.py

@@ -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')

+ 1 - 1
youtube_dl/extractor/mtv.py

@@ -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')