Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't download from fc2 #10560

Closed
whitesiroi opened this issue Sep 5, 2016 · 14 comments
Closed

Can't download from fc2 #10560

whitesiroi opened this issue Sep 5, 2016 · 14 comments

Comments

@whitesiroi
Copy link

@whitesiroi whitesiroi commented Sep 5, 2016

I'm using the newest version:

$ youtube-dl --version
2016.09.04.1

the 2-nd part of the movie

youtube-dl -v "http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=20140322uUEnqPZp&d=2653&sj=48000&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=%E3%83%97%E3%83%AA%E3%82%BA%E3%83%B3%EF%BD%A5%E3%83%96%E3%83%AC%E3%82%A4%E3%82%AF%20S1-02%20%E3%82%A2%E3%83%AC%E3%83%B3%20%E3%80%90%E5%90%B9%E6%9B%BF%E3%80%91"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=20140322uUEnqPZp&d=2653&sj=48000&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=%E3%83%97%E3%83%AA%E3%82%BA%E3%83%B3%EF%BD%A5%E3%83%96%E3%83%AC%E3%82%A4%E3%82%AF%20S1-02%20%E3%82%A2%E3%83%AC%E3%83%B3%20%E3%80%90%E5%90%B9%E6%9B%BF%E3%80%91']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.09.04.1
[debug] Python version 2.7.10 - Darwin-15.6.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.8, ffprobe 2.8
[debug] Proxy map: {}
[fc2] 20140322uUEnqPZp: Downloading info page
[debug] Invoking downloader on u'http://vip.video48000-cdn2.fc2.com/up/flv/201403/22/u/20140322uUEnqPZp.cdn.flv?mid=cd86bdf82b0afc2c073ebe103f09f0b6'
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1696, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1638, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 354, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 58, in real_download
    data = self.ydl.urlopen(request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1998, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden

the 3-rd part of the movie

youtube-dl "http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=20140322hHzrBKeG&d=2647&sj=48000&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=%E3%83%97%E3%83%AA%E3%82%BA%E3%83%B3%EF%BD%A5%E3%83%96%E3%83%AC%E3%82%A4%E3%82%AF%20S1-03%20%E3%82%BB%E3%83%AB%E3%83%86%E3%82%B9%E3%83%88%20%E3%80%90%E5%90%B9%E6%9B%BF%E3%80%91"
[fc2] 20140322hHzrBKeG: Downloading info page
ERROR: unable to download video data: HTTP Error 403: Forbidden

I didn't get any error with the first video with the same url structure and was able to download it with the same command:

$ youtube-dl "http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=201403223kCqB3Ez&d=2625&sj=11&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=%E3%83%97%E3%83%AA%E3%82%BA%E3%83%B3%EF%BD%A5%E3%83%96%E3%83%AC%E3%82%A4%E3%82%AF%20S1-01%20%E3%83%9E%E3%82%A4%E3%82%B1%E3%83%AB%20%E3%80%90%E5%90%B9%E6%9B%BF%E3%80%91"
[fc2] 201403223kCqB3Ez: Downloading info page
[download] Resuming download at byte 1047552
[download] Destination: プリズン・ブレイク S1-01 マイケル 【吹替】-201403223kCqB3Ez.flv
[download]   0.7% of 294.04MiB at 566.73KiB/s ETA 08:47^C
ERROR: Interrupted by user
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 5, 2016

Can you watch them in browser in the first place?

@whitesiroi
Copy link
Author

@whitesiroi whitesiroi commented Sep 5, 2016

yes I can.
1st http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=201403223kCqB3Ez&d=2625&sj=11&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=%E3%83%97%E3%83%AA%E3%82%BA%E3%83%B3%EF%BD%A5%E3%83%96%E3%83%AC%E3%82%A4%E3%82%AF%20S1-01%20%E3%83%9E%E3%82%A4%E3%82%B1%E3%83%AB%20%E3%80%90%E5%90%B9%E6%9B%BF%E3%80%91

2nd http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=20140322uUEnqPZp&d=2653&sj=48000&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=%E3%83%97%E3%83%AA%E3%82%BA%E3%83%B3%EF%BD%A5%E3%83%96%E3%83%AC%E3%82%A4%E3%82%AF%20S1-02%20%E3%82%A2%E3%83%AC%E3%83%B3%20%E3%80%90%E5%90%B9%E6%9B%BF%E3%80%91http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=20140322uUEnqPZp&d=2653&sj=48000&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=%E3%83%97%E3%83%AA%E3%82%BA%E3%83%B3%EF%BD%A5%E3%83%96%E3%83%AC%E3%82%A4%E3%82%AF%20S1-02%20%E3%82%A2%E3%83%AC%E3%83%B3%20%E3%80%90%E5%90%B9%E6%9B%BF%E3%80%91

3rd http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=20140322hHzrBKeG&d=2647&sj=48000&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=%E3%83%97%E3%83%AA%E3%82%BA%E3%83%B3%EF%BD%A5%E3%83%96%E3%83%AC%E3%82%A4%E3%82%AF%20S1-03%20%E3%82%BB%E3%83%AB%E3%83%86%E3%82%B9%E3%83%88%20%E3%80%90%E5%90%B9%E6%9B%BF%E3%80%91

all of them https://otarunosushi.wordpress.com/2015/07/03/%E5%90%B9%E6%9B%BF-%E3%83%97%E3%83%AA%E3%82%BA%E3%83%B3%EF%BD%A5%E3%83%96%E3%83%AC%E3%82%A4%E3%82%AF-%E3%82%B7%E3%83%BC%E3%82%BA%E3%83%B31-%E5%85%A822%E8%A9%B1/

I was able to download everyone of them except the 2nd & the 3rd one.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 6, 2016

Could you post the output of the following command?

youtube-dl -v --print-traffic "<video URL>"
@whitesiroi
Copy link
Author

@whitesiroi whitesiroi commented Sep 6, 2016

$ youtube-dl -v --print-traffic "http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=20140322hHzrBKeG&d=2647&sj=48000&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=プリズン・ブレイク%20S1-03%20 セルテスト%20【吹替】"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'--print-traffic', u'http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=20140322hHzrBKeG&d=2647&sj=48000&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=\u30d7\u30ea\u30ba\u30f3\uff65\u30d6\u30ec\u30a4\u30af%20S1-03%20\u30bb\u30eb\u30c6\u30b9\u30c8%20\u3010\u5439\u66ff\u3011']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.09.04.1
[debug] Python version 2.7.10 - Darwin-15.6.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.8, ffprobe 2.8
[debug] Proxy map: {}
[fc2] 20140322hHzrBKeG: Downloading info page
send: u'GET /ginfo.php?mimi=bd1d7c6ef7deba2163b653e0471306e0&href=fc2%3A20140322hHzrBKeG&v=20140322hHzrBKeG&fversion=WIN%2011%2C6%2C602%2C180&from=2&otag=0&upid=20140322hHzrBKeG&tk=null& HTTP/1.1\r\nHost: video.fc2.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/47.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: nginx
header: Date: Tue, 06 Sep 2016 15:17:25 GMT
header: Content-Type: text/plain; charset=utf-8
header: Connection: close
header: Set-Cookie: PHPSESSID=ba3001364e0f1d74d3c95b45415f3413; path=/; domain=.fc2.com; HttpOnly
header: Expires: Thu, 19 Nov 1981 08:52:00 GMT
header: Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
header: Pragma: no-cache
header: Set-Cookie: dkelx=vip.video48000-cdn2.fc2.com; path=/; domain=fc2.com
header: Vary: Accept-Encoding
header: X-Whom: 1011
header: X-XSS-Protection: 1; mode=block
header: X-Content-Type-Options: nosniff
header: Transfer-Encoding: chunked
[debug] Invoking downloader on u'http://vip.video48000-cdn2.fc2.com/up/flv/201403/22/h/20140322hHzrBKeG.cdn.flv?mid=aceb2490644c36a51b09739f33f1f954'
send: u'GET /up/flv/201403/22/h/20140322hHzrBKeG.cdn.flv?mid=aceb2490644c36a51b09739f33f1f954 HTTP/1.1\r\nHost: vip.video48000-cdn2.fc2.com\r\nAccept-Encoding: identity\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/47.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nConnection: close\r\nCookie: dkelx=vip.video48000-cdn2.fc2.com; PHPSESSID=ba3001364e0f1d74d3c95b45415f3413\r\n\r\n'
reply: 'HTTP/1.1 403 Forbidden\r\n'
header: Date: Tue, 06 Sep 2016 15:17:26 GMT
header: Server: PWS/8.1.38
header: Content-Length: 0
header: Connection: close
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1696, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1638, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 354, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 58, in real_download
    data = self.ydl.urlopen(request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1998, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 6, 2016

Thanks. Need some more information: could you post the output of:

curl -v "http://vip.video48000-cdn2.fc2.com/up/flv/201403/22/h/20140322hHzrBKeG.cdn.flv?mid=aceb2490644c36a51b09739f33f1f954" -H "Host: vip.video48000-cdn2.fc2.com" -H "Accept-Encoding: identity" -H "Accept-Language: en-us,en;q=0.5" -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/47.0 (Chrome)" -H "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nConnection: close" -H "Cookie: dkelx=vip.video48000-cdn2.fc2.com; PHPSESSID=ba3001364e0f1d74d3c95b45415f3413" > output.flv
@whitesiroi
Copy link
Author

@whitesiroi whitesiroi commented Sep 6, 2016

Thank you for your help.

$ curl -v "http://vip.video48000-cdn2.fc2.com/up/flv/201403/22/h/20140322hHzrBKeG.cdn.flv?mid=aceb2490644c36a51b09739f33f1f954" -H "Host: vip.video48000-cdn2.fc2.com" -H "Accept-Encoding: identity" -H "Accept-Language: en-us,en;q=0.5" -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/47.0 (Chrome)" -H "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nConnection: close" -H "Cookie: dkelx=vip.video48000-cdn2.fc2.com; PHPSESSID=ba3001364e0f1d74d3c95b45415f3413" > output.flv
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 14.0.35.7...
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0* Connected to vip.video48000-cdn2.fc2.com (14.0.35.7) port 80 (#0)
> GET /up/flv/201403/22/h/20140322hHzrBKeG.cdn.flv?mid=aceb2490644c36a51b09739f33f1f954 HTTP/1.1
> Host: vip.video48000-cdn2.fc2.com
> Accept-Encoding: identity
> Accept-Language: en-us,en;q=0.5
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nConnection: close
> Cookie: dkelx=vip.video48000-cdn2.fc2.com; PHPSESSID=ba3001364e0f1d74d3c95b45415f3413
>
< HTTP/1.1 403 Forbidden
< Date: Tue, 06 Sep 2016 15:47:08 GMT
< Server: PWS/8.1.38
< Content-Length: 0
< Connection: keep-alive
<
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
* Connection #0 to host vip.video48000-cdn2.fc2.com left intact
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 6, 2016

From your log vip.video48000-cdn2.fc2.com resolves to 14.0.35.7. On my side the same host name resolves to 199.116.179.41. According to IPGeek [1][2], 199.116.179.41 is a IP of FC2, while 14.0.35.7 is a CDN network in Japan. Could you check your DNS settings? I'm using 8.8.8.8 and everything works fine:

$ curl -v "http://vip.video48000-cdn2.fc2.com/up/flv/201403/22/h/20140322hHzrBKeG.cdn.flv?mid=aceb2490644c36a51b09739f33f1f954" -H "Host: vip.video48000-cdn2.fc2.com" -H "Accept-Encoding: identity" -H "Accept-Language: en-us,en;q=0.5" -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/47.0 (Chrome)" -H "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nConnection: close" -H "Cookie: dkelx=vip.video48000-cdn2.fc2.com; PHPSESSID=ba3001364e0f1d74d3c95b45415f3413" > output.flv
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 199.116.179.41...
* Connected to vip.video48000-cdn2.fc2.com (199.116.179.41) port 80 (#0)
> GET /up/flv/201403/22/h/20140322hHzrBKeG.cdn.flv?mid=aceb2490644c36a51b09739f33f1f954 HTTP/1.1
> Host: vip.video48000-cdn2.fc2.com
> Accept-Encoding: identity
> Accept-Language: en-us,en;q=0.5
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nConnection: close
> Cookie: dkelx=vip.video48000-cdn2.fc2.com; PHPSESSID=ba3001364e0f1d74d3c95b45415f3413
> 
< HTTP/1.1 200 OK
< Server: nginx/1.2.8
< Date: Tue, 06 Sep 2016 15:28:32 GMT
< Content-Type: video/x-flv
< Content-Length: 312055625
< Last-Modified: Sat, 22 Mar 2014 05:14:36 GMT
< Connection: keep-alive
< Accept-Ranges: bytes
< 
{ [1225 bytes data]
  0  297M    0  370k    0     0   120k      0  0:42:18  0:00:03  0:42:15  120k^C

[1] http://www.ipgeek.net/14.0.35.7
[2] http://www.ipgeek.net/199.116.179.41

@whitesiroi
Copy link
Author

@whitesiroi whitesiroi commented Sep 6, 2016

I changed my DNS settings to 8.8.8.8

Getting the same error:

$ youtube-dl "http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=20140322hHzrBKeG&d=2647&sj=48000&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=%E3%83%97%E3%83%AA%E3%82%BA%E3%83%B3%EF%BD%A5%E3%83%96%E3%83%AC%E3%82%A4%E3%82%AF%20S1-03%20%E3%82%BB%E3%83%AB%E3%83%86%E3%82%B9%E3%83%88%20%E3%80%90%E5%90%B9%E6%9B%BF%E3%80%91"
[fc2] 20140322hHzrBKeG: Downloading info page
ERROR: unable to download video data: HTTP Error 403: Forbidden
artem@machine:~/Downloads/movies/Prison Break 1 Season Jap/test$ youtube-dl -v "http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=20140322hHzrBKeG&d=2647&sj=48000&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=%E3%83%97%E3%83%AA%E3%82%BA%E3%83%B3%EF%BD%A5%E3%83%96%E3%83%AC%E3%82%A4%E3%82%AF%20S1-03%20%E3%82%BB%E3%83%AB%E3%83%86%E3%82%B9%E3%83%88%20%E3%80%90%E5%90%B9%E6%9B%BF%E3%80%91"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://video.fc2.com/flv2.swf?t=201404182936758512407645&i=20130316kwishtfitaknmcgd76kjd864hso93htfjcnaogz629mcgfs6rbfk0hsycma7shkf85937cbchfygd74&i=20140322hHzrBKeG&d=2647&sj=48000&lang=ja&rel=1&from=11&cmt=1&tk=TlRBM09EQTNNekU9&tl=%E3%83%97%E3%83%AA%E3%82%BA%E3%83%B3%EF%BD%A5%E3%83%96%E3%83%AC%E3%82%A4%E3%82%AF%20S1-03%20%E3%82%BB%E3%83%AB%E3%83%86%E3%82%B9%E3%83%88%20%E3%80%90%E5%90%B9%E6%9B%BF%E3%80%91']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.09.04.1
[debug] Python version 2.7.10 - Darwin-15.6.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.8, ffprobe 2.8
[debug] Proxy map: {}
[fc2] 20140322hHzrBKeG: Downloading info page
[debug] Invoking downloader on u'http://vip.video48000-cdn2.fc2.com/up/flv/201403/22/h/20140322hHzrBKeG.cdn.flv?mid=aceb2490644c36a51b09739f33f1f954'
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1696, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1638, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 354, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 58, in real_download
    data = self.ydl.urlopen(request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1998, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden
$ curl -v "http://vip.video48000-cdn2.fc2.com/up/flv/201403/22/h/20140322hHzrBKeG.cdn.flv?mid=aceb2490644c36a51b09739f33f1f954" -H "Host: vip.video48000-cdn2.fc2.com" -H "Accept-Encoding: identity" -H "Accept-Language: en-us,en;q=0.5" -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/47.0 (Chrome)" -H "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nConnection: close" -H "Cookie: dkelx=vip.video48000-cdn2.fc2.com; PHPSESSID=ba3001364e0f1d74d3c95b45415f3413" > output.flv
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 14.0.38.66...
* Connected to vip.video48000-cdn2.fc2.com (14.0.38.66) port 80 (#0)
> GET /up/flv/201403/22/h/20140322hHzrBKeG.cdn.flv?mid=aceb2490644c36a51b09739f33f1f954 HTTP/1.1
> Host: vip.video48000-cdn2.fc2.com
> Accept-Encoding: identity
> Accept-Language: en-us,en;q=0.5
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nConnection: close
> Cookie: dkelx=vip.video48000-cdn2.fc2.com; PHPSESSID=ba3001364e0f1d74d3c95b45415f3413
>
< HTTP/1.1 403 Forbidden
< Date: Tue, 06 Sep 2016 16:03:27 GMT
< Server: PWS/8.1.38
< Content-Length: 0
< Connection: keep-alive
<
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Connection #0 to host vip.video48000-cdn2.fc2.com left intact

I don't understand how DNS stuff works, maybe, I did something wrong?
https://s10.postimg.org/j2ckpilzd/2016_09_07_1_04_03.png

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 6, 2016

Looks fine. Could you try reconnect and/or reboot?

@whitesiroi
Copy link
Author

@whitesiroi whitesiroi commented Sep 6, 2016

:)
Looks like I was able to change my DNS

$ cat /etc/resolv.conf | grep nameserver
nameserver 8.8.8.8

I also tried to reconnect & also reboot my Mac, but still getting the same error :)

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 6, 2016

Maybe your ISP is hijacking DNS requests... What's the output of this command?

nslookup vip.video48000-cdn2.fc2.com 8.8.8.8
@whitesiroi
Copy link
Author

@whitesiroi whitesiroi commented Sep 6, 2016

$ nslookup vip.video48000-cdn2.fc2.com 8.8.8.8
Server:     8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
vip.video48000-cdn2.fc2.com     canonical name = vip.video48000-cdn2.fc2.com.cdngl.net.
vip.video48000-cdn2.fc2.com.cdngl.net   canonical name = vip.video48000-cdn2.fc2.com.portion.cdngl.net.
vip.video48000-cdn2.fc2.com.portion.cdngl.net   canonical name = vip.video48000-cdn2.fc2.com.cdngc.net.
Name:   vip.video48000-cdn2.fc2.com.cdngc.net
Address: 14.0.41.70
Name:   vip.video48000-cdn2.fc2.com.cdngc.net
Address: 14.0.44.77
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 6, 2016

Well, now it's interesting why the video works fine in browsers. Maybe browsers have a correct DNS cache. Anyway, you may want to ask your ISP to stop modifying DNS results, or fix 14.0.44.77

Another approach is adding a line to /etc/hosts:

199.116.179.41 vip.video48000-cdn2.fc2.com

Closing. DNS problems are far beyond the scope of youtube-dl.

@yan12125 yan12125 closed this Sep 6, 2016
@whitesiroi
Copy link
Author

@whitesiroi whitesiroi commented Sep 7, 2016

@yan12125 Thank you very much.

Another approach is adding a line to /etc/hosts:
199.116.179.41 vip.video48000-cdn2.fc2.com

Works perfectly.

@ytdl-org ytdl-org deleted a comment Oct 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.