m13253 / BiliDan

Play videos on Bilibili.com with MPV and Danmaku2ASS
http://m13253.blogspot.com/2014/06/watch-bilibili-with-biligrab-danmaku2ass.html
Other
513 stars 69 forks source link

Can not get valid media URLs on New Animate #37

Closed pfei-sa closed 8 years ago

pfei-sa commented 8 years ago
python3 ~/UsefulPythonScript/bilidan.py http://www.bilibili.com/video/av2331762/ --source overseas
INFO: Loading video info...
INFO: Got video cid: 3641122
INFO: Loading video content...
ERROR: Can not get valid media URLs.

I am not in China

cthbleachbit commented 8 years ago

Bilibili has copyright restrictions on those anime, so you might need a proxy server in mainland china.

pfei-sa commented 8 years ago

Do I still have to use a proxy even I am using the --source overseas parameter? If so, what does that parameter do?

cnbeining commented 8 years ago

Yes. "Overseas" source only means you are using "海外加速" API, also called "CDN" API. You have to deal with the IP restrictions by yourself.

One workaround is to use Proxifier to force Python to use your proxy.

Also you can check Biligrab's IP bypass function, which provides a simple function to bypass those restrictions. Please notice that it is never the goal of Biligrab to download copyright-restricted video.

pfei-sa commented 8 years ago

I see, do you have any recommendations on Chinese proxy? And is it possible to add an porxy parameter in the program in the future? Thank you.

cnbeining commented 8 years ago

Personally I myself do not recommend any proxies.

Technically speaking it is possible to add such function, but it depends of the plan of the author. @m13253

cthbleachbit commented 8 years ago

check proxychains-ng package. this package provides command-wide proxy handling.

pfei-sa commented 8 years ago

Thank you very much.

m13253 commented 8 years ago

BiliDan supports setting HTTP proxy via http_proxy and https_proxy environment variables.

For SOCKS protocol, use proxychains_ng.

Also you may try flvcd or bilipr as video source option.

pfei-sa commented 8 years ago

The problem I am having is that I don’t have a chinese proxy(LOL)

cnbeining commented 8 years ago

Well, did you try reverse engineering Hola the Plugin?

pfei-sa commented 8 years ago

Sorry, my programming skill aren’t very good.

zanderzhng commented 8 years ago

merge my commit and use -f. @tonyrft