Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
403 on cinemassacre #5615
403 on cinemassacre #5615
Comments
|
Post the full output you get when running with |
|
|
Can you watch it in browser? |
Video embedded on a site works without a problem. URL resolved by youtube-dl also opens and plays in the browser (after being redirected to $ youtube --get-url http://cinemassacre.com/2015/03/30/probotectorcontra-nes-guest-doug-walker/
http://video2.screenwavemedia.com/vod/Cinemassacre-55185591835ec_hd1.mp4
# Chrome's request + `--head --location`:
$ curl --head --location 'http://video2.screenwavemedia.com/vod/Cinemassacre-55185591835ec_hd1.mp4' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-GB,en;q=0.8,en-US;q=0.6,pl;q=0.4' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36' --compressed
HTTP/1.1 302 Found
Server: Nimble/2.6.0-9
Date: Sat, 16 May 2015 17:35:54 GMT
Location: http://video2.screenwavemedia.com/vod/Cinemassacre-55185591835ec_hd1.mp4?nimblesessionid=3482958
Content-Length: 0
Connection: close
HTTP/1.1 200 OK
Date: Sat, 16 May 2015 17:35:54 GMT
Server: Nimble/2.6.0-9
Content-Length: 200084801
Cache-Control: no-cache
Content-Type: video/mp4
Access-Control-Allow-Origin: *
Connection: Keep-AliveAlso, just realised that these work: wget $( youtube-dl --get-url http://cinemassacre.com/2015/03/30/probotectorcontra-nes-guest-doug-walker/ )
curl --location -O $( youtube-dl --get-url http://cinemassacre.com/2015/03/30/probotectorcontra-nes-guest-doug-walker/ )Maybe redirection is the problem? This line in the trackback would suggst so:
|
|
This is probably due to HLS being used for streaming in browser. youtube-dl now downloads direct HD link, however for me this approach still works. |
This does not explain why this works: wget $( youtube-dl --get-url http://cinemassacre.com/2015/03/30/probotectorcontra-nes-guest-doug-walker/ )Here are versions of things I am using: $ youtube-dl --version
2015.05.15
$ lsb_release -d
Description: Ubuntu 15.04
# (I've tried both python 2 and three with same result)
$ python2 --version
Python 2.7.9
$ python3 --version
Python 3.4.3
# traceback mentioned urllib2, so I'm showing that as well:
dpkg -S /usr/lib/python2.7/urllib2.py
libpython2.7-stdlib:amd64: /usr/lib/python2.7/urllib2.py |
|
(Forgot about |
|
Post the output of |
$ youtube-dl --version
2015.05.20
$ youtube-dl --print-traffic http://cinemassacre.com/2015/03/30/probotectorcontra-nes-guest-doug-walker/
[Cinemassacre] probotectorcontra-nes-guest-doug-walker: Downloading webpage
send: u'GET /2015/03/30/probotectorcontra-nes-guest-doug-walker/ HTTP/1.1\r\nHost: cinemassacre.com\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/20.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Wed, 20 May 2015 17:18:59 GMT
header: Content-Type: text/html; charset=UTF-8
header: Transfer-Encoding: chunked
header: Connection: close
header: Set-Cookie: __cfduid=d75f25d961e556d14eec8dafb7c38c2761432142339; expires=Thu, 19-May-16 17:18:59 GMT; path=/; domain=.cinemassacre.com; HttpOnly
header: Last-Modified: Wed, 20 May 2015 17:01:59 GMT
header: Cache-Control: max-age=3, must-revalidate
header: Expires: Wed, 20 May 2015 17:17:39 GMT
header: Vary: Accept-Encoding,Cookie
header: Server: cloudflare-nginx
header: CF-RAY: 1e99b43487bd0b7b-LHR
header: Content-Encoding: gzip
[ScreenwaveMedia] Cinemassacre-55185591835ec: Downloading player webpage
send: u'GET /play/player.php?id=Cinemassacre-55185591835ec HTTP/1.1\r\nHost: player.screenwavemedia.com\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/20.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: Apache/2.4.12 (Ubuntu)
header: Vary: Accept-Encoding
header: Content-Encoding: gzip
header: Access-Control-Allow-Origin: *
header: Access-Control-Allow-Headers: origin, x-requested-with, content-type
header: Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS
header: Content-Type: text/html; charset=utf-8
header: x-url: /play/player.php?id=Cinemassacre-55185591835ec
header: x-host: player.screenwavemedia.com
header: Cache-Control: max-age=180, public
header: Content-Length: 2405
header: Accept-Ranges: bytes
header: Date: Wed, 20 May 2015 17:18:59 GMT
header: X-Varnish: 1403963510 1403963376
header: Age: 16
header: Via: 1.1 varnish
header: Connection: close
header: X-Cache: HIT
header: X-Cache-Hits: 1
send: u'GET /vod/Cinemassacre-55185591835ec_hd1.mp4 HTTP/1.1\r\nHost: video2.screenwavemedia.com\r\nAccept-Encoding: identity\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nConnection: close\r\nAccept-Language: en-us,en;q=0.5\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/20.0 (Chrome)\r\n\r\n'
reply: 'HTTP/1.1 302 Found\r\n'
header: Server: Nimble/2.6.0-9
header: Date: Wed, 20 May 2015 17:19:00 GMT
header: Location: http://video2.screenwavemedia.com/vod/Cinemassacre-55185591835ec_hd1.mp4?nimblesessionid=3922849
header: Content-Length: 0
header: Connection: close
send: u'GET /vod/Cinemassacre-55185591835ec_hd1.mp4?nimblesessionid=3922849 HTTP/1.1\r\nHost: video2.screenwavemedia.com\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/20.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 403 Forbidden\r\n'
header: Date: Wed, 20 May 2015 17:19:00 GMT
header: Server: Nimble/2.6.0-9
header: Content-Length: 72
header: Connection: close
header: Content-Type: text/html
ERROR: unable to download video data: HTTP Error 403: ForbiddenI’ve recreated second request (after redirection) using $ curl --head \
-H 'Host: video2.screenwavemedia.com' \
-H 'Accept-Language: en-us,en;q=0.5' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/20.0 (Chrome)' \
-H 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7' \
-H 'Connection: close' \
'http://video2.screenwavemedia.com/vod/Cinemassacre-55185591835ec_hd1.mp4?nimblesessionid=3922849'
HTTP/1.1 403 Forbidden
Date: Wed, 20 May 2015 17:27:34 GMT
Server: Nimble/2.6.0-9
Content-Length: 72
Connection: close
Content-Type: text/html… but removing $ curl --head \
-H 'Host: video2.screenwavemedia.com' \
-H 'Accept-Language: en-us,en;q=0.5' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/20.0 (Chrome)' \
-H 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7' \
'http://video2.screenwavemedia.com/vod/Cinemassacre-55185591835ec_hd1.mp4?nimblesessionid=3922849'
HTTP/1.1 200 OK
Date: Wed, 20 May 2015 17:28:06 GMT
Server: Nimble/2.6.0-9
Content-Length: 200084801
Cache-Control: no-cache
Content-Type: video/mp4
Access-Control-Allow-Origin: *
Connection: close |
|
I spotted a curious thing while messing around with the same issue. It seems to not happen 100% of the time so removing the 'Connection: close' header doesn't actually fix anything; the server just decided to accept the connection that time. If you just try running youtube-dl again, it might suddenly start the dl without any issues. I did a few tries on a recent video (shortened a bit):
The last invocations were only seconds apart. I tried this with cURL too with similiar results so it seems like the issue is that ScreenwaveMedia's server sometimes sends out 403s for a perfectly fine request. I'd say the only way to fix this would be to make it retry after a few seconds on a 403 error, as the issue seems to be completely on their end. PS. I had to edit |
Interesting. I've never managed to download the video using youtube-dl before and never hit 403 using curl, besides when I've included I’ve checked out master, run downloading in a loop: while youtube-dl --verbose … ; sleep 10 ; doneand only after 13 minutes video started downloading. After I Ctrl-C it and retried, I started getting 403s again. |
|
Cinemassacre now uses JW Platform. This should work now. |
Using youtube-dl on any page on cinemassacre.com generates a 403 error. Pages play fine in any web browser from same IP.
Example page: http://cinemassacre.com/2015/03/30/probotectorcontra-nes-guest-doug-walker/
$ youtube-dl http://cinemassacre.com/2015/03/30/probotectorcontra-nes-guest-doug-walker/
[Cinemassacre] probotectorcontra-nes-guest-doug-walker: Downloading webpage
[ScreenwaveMedia] Cinemassacre-55185591835ec: Downloading player webpage
ERROR: unable to download video data: HTTP Error 403: Forbidden