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
def _real_extract(self, url):
video_id = self._match_id(url)
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):
data = self._download_json(json_url, video_id)
def get_optional(data_dict, field):