]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube_dl/extractor/generic.py
[generic] Add comment for unescaping webpage contents
[youtube-dl.git] / youtube_dl / extractor / generic.py
index 6e632477921c17bfd0dff837074b72d4ae83abed..300485c7f81b2ee6cba9f03823592d31b2fc6f9a 100644 (file)
@@ -291,6 +291,11 @@ class GenericIE(InfoExtractor):
         except compat_xml_parse_error:
             pass
 
+        # Sometimes embedded video player is hidden behind percent encoding
+        # (e.g. https://github.com/rg3/youtube-dl/issues/2448)
+        # Unescaping the whole page allows to handle those cases in a generic way
+        webpage = compat_urllib_parse.unquote(webpage)
+
         # it's tempting to parse this further, but you would
         # have to take into account all the variations like
         #   Video Title - Site Name