Fix bug dailymotion not playing video with "Server returned 403: Forbidden"
Dailymotion video url send cookies then use a 302 redirect to the real video url The real video url check the cookies sent in the request. Some mediaplayer (mplayer) can not handle this. So we use pure python urllib2 to handle this and load the video. The video bytes are piped to the mediaplayer. Others modules might need this. They just have to set the "_play_proxy" boolean attribute to the video object. Signed-off-by: Vincent Texier <vit@free.fr>
This commit is contained in:
parent
ffe1c43300
commit
7a72b94b37
2 changed files with 53 additions and 2 deletions
|
|
@ -153,6 +153,9 @@ class VideoPage(BasePage):
|
|||
|
||||
video.url = unicode(info[max_quality])
|
||||
|
||||
# dailymotion video url is protected by a redirection with cookie verification
|
||||
# so we need to do a "play_proxy" using urllib2 proxy streaming to handle this
|
||||
video._play_proxy = True
|
||||
|
||||
class KidsVideoPage(VideoPage):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue