mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-24 05:36:56 +01:00
[cultureunplugged] fix extraction(closes #10330)
This commit is contained in:
parent
292a2301bf
commit
e25586e471
@ -1,9 +1,13 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
import time
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import int_or_none
|
from ..utils import (
|
||||||
|
int_or_none,
|
||||||
|
HEADRequest,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class CultureUnpluggedIE(InfoExtractor):
|
class CultureUnpluggedIE(InfoExtractor):
|
||||||
@ -32,6 +36,9 @@ def _real_extract(self, url):
|
|||||||
video_id = mobj.group('id')
|
video_id = mobj.group('id')
|
||||||
display_id = mobj.group('display_id') or video_id
|
display_id = mobj.group('display_id') or video_id
|
||||||
|
|
||||||
|
# request setClientTimezone.php to get PHPSESSID cookie which is need to get valid json data in the next request
|
||||||
|
self._request_webpage(HEADRequest(
|
||||||
|
'http://www.cultureunplugged.com/setClientTimezone.php?timeOffset=%d' % -(time.timezone / 3600)), display_id)
|
||||||
movie_data = self._download_json(
|
movie_data = self._download_json(
|
||||||
'http://www.cultureunplugged.com/movie-data/cu-%s.json' % video_id, display_id)
|
'http://www.cultureunplugged.com/movie-data/cu-%s.json' % video_id, display_id)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user