aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2016-08-20 20:02:49 +0100
committerRemita Amine <remitamine@gmail.com>2016-08-20 20:02:49 +0100
commite25586e47163c83e519ae0af9aa6d8fbc3d58ef4 (patch)
treebc99572e4b59d69adf72f3ca11876b26ac2b1246 /youtube_dl
parent292a2301bf0b99be81640c4511d78ebc3c622dad (diff)
[cultureunplugged] fix extraction(closes #10330)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/cultureunplugged.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/youtube_dl/extractor/cultureunplugged.py b/youtube_dl/extractor/cultureunplugged.py
index 9c764fe68..9f26fa587 100644
--- a/youtube_dl/extractor/cultureunplugged.py
+++ b/youtube_dl/extractor/cultureunplugged.py
@@ -1,9 +1,13 @@
from __future__ import unicode_literals
import re
+import time
from .common import InfoExtractor
-from ..utils import int_or_none
+from ..utils import (
+ int_or_none,
+ HEADRequest,
+)
class CultureUnpluggedIE(InfoExtractor):
@@ -32,6 +36,9 @@ class CultureUnpluggedIE(InfoExtractor):
video_id = mobj.group('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(
'http://www.cultureunplugged.com/movie-data/cu-%s.json' % video_id, display_id)