mirror of
https://github.com/l1ving/youtube-dl
synced 2020-11-18 19:53:54 -08:00
[teamcoco] fix and improve extraction
This commit is contained in:
parent
5484828418
commit
e3d70d458a
@ -67,6 +67,9 @@ class TeamcocoIE(TurnerBaseIE):
|
|||||||
'skip_download': True, # m3u8 downloads
|
'skip_download': True, # m3u8 downloads
|
||||||
},
|
},
|
||||||
'skip': 'This video is no longer available.',
|
'skip': 'This video is no longer available.',
|
||||||
|
}, {
|
||||||
|
'url': 'http://teamcoco.com/comiccon/andy-finds-the-infinity-gauntlet?playlist=x;eyJ0eXBlIjoidGFnIiwiaWQiOjF9',
|
||||||
|
'only_matching': True,
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://teamcoco.com/video/the-conan-audiencey-awards-for-04/25/18',
|
'url': 'http://teamcoco.com/video/the-conan-audiencey-awards-for-04/25/18',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
@ -83,11 +86,17 @@ class TeamcocoIE(TurnerBaseIE):
|
|||||||
]
|
]
|
||||||
|
|
||||||
def _graphql_call(self, query_template, object_type, object_id):
|
def _graphql_call(self, query_template, object_type, object_id):
|
||||||
find_object = 'find' + object_type
|
if not isinstance(object_type, (list, tuple)):
|
||||||
|
object_type = [object_type]
|
||||||
|
for find_object in object_type:
|
||||||
|
find_object = 'find' + find_object
|
||||||
|
try:
|
||||||
return self._download_json(
|
return self._download_json(
|
||||||
'http://teamcoco.com/graphql/', object_id, data=json.dumps({
|
'http://teamcoco.com/graphql/', object_id, data=json.dumps({
|
||||||
'query': query_template % (find_object, object_id)
|
'query': query_template % (find_object, object_id)
|
||||||
}))['data'][find_object]
|
}), fatal=False)['data'][find_object]
|
||||||
|
except (AttributeError, KeyError, TypeError, IndexError):
|
||||||
|
pass
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
display_id = self._match_id(url)
|
display_id = self._match_id(url)
|
||||||
@ -149,7 +158,7 @@ class TeamcocoIE(TurnerBaseIE):
|
|||||||
%s(id: "%s") {
|
%s(id: "%s") {
|
||||||
src
|
src
|
||||||
}
|
}
|
||||||
}''', 'RecordVideoSource', video_id) or {}
|
}''', ('Record', 'RecordVideoSource'), video_id) or {}
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
get_quality = qualities(['low', 'sd', 'hd', 'uhd'])
|
get_quality = qualities(['low', 'sd', 'hd', 'uhd'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user