]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[archive.org] Fix incorrect url condition (closes #5628)
authorblissland <blissland.house@googlemail.com>
Wed, 6 May 2015 10:48:36 +0000 (11:48 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 6 May 2015 13:06:10 +0000 (15:06 +0200)
The condition for assigning to json_url is the wrong way round:

currently for url: aaa.com/xxx

we get:

aaa.com/xxx&output=json

instead of the correct value:

aaa.com/xxx?output=json

youtube_dl/extractor/archiveorg.py

index 9fc35a42b8612d828ccc3ae43c9e4f74782f5352..8feb7cb7456ec4db8d6a8f28b411a58cb5ac47a1 100644 (file)
@@ -33,7 +33,7 @@ class ArchiveOrgIE(InfoExtractor):
     def _real_extract(self, url):
         video_id = self._match_id(url)
 
-        json_url = url + ('?' if '?' in url else '&') + 'output=json'
+        json_url = url + ('&' if '?' in url else '?') + 'output=json'
         data = self._download_json(json_url, video_id)
 
         def get_optional(data_dict, field):