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

HTML5解析问题 #23

Open
Sg4Dylan opened this issue Nov 20, 2015 · 5 comments
Open

HTML5解析问题 #23

Sg4Dylan opened this issue Nov 20, 2015 · 5 comments
Assignees
Labels

Comments

@Sg4Dylan
Copy link

比如视频 http://www.bilibili.tv/video/av3214525/index_1.html
通过本程序得到的JSON
{"img":"http://i1.hdslb.com/video/e1/e189bd6ac593b8a42ac2ea81e7caf72f.jpg","cid":"http://comment.bilibili.com/5071908.xml","src":"http://static.hdslb.com/error.mp4"}
浏览器直接打开得到的JSON
{"img":"http://i1.hdslb.com/video/e1/e189bd6ac593b8a42ac2ea81e7caf72f.jpg","cid":"http://comment.bilibili.com/5071908.xml","src":"http://cn-jxnc1-dx.acgvideo.com/vg1/c/46/5071908.mp4?expires=1448026200&ssig=hnVyXyfaUPQMQcj1x85BgA&oi=1867408109&internal=1&rate=0"}
出现这种情况的时候,find_video_address_normal_api 函数也会返回空值
强行使用 FAKE_HEADER 也是一样的
希望能够解决(
谢谢

@cnbeining
Copy link
Owner

这种问题都比较难reproduce。

HTML5的API不受推荐,因为不会有清晰度或者速度的提升。当然稍后我会仔细审查此问题。

2015年11月20日星期五,Sg4Dylan [email protected] 写道:

比如视频 http://www.bilibili.tv/video/av3214525/index_1.html
通过本程序得到的JSON
{"img":"
http://i1.hdslb.com/video/e1/e189bd6ac593b8a42ac2ea81e7caf72f.jpg","cid":"http://comment.bilibili.com/5071908.xml","src":"http://static.hdslb.com/error.mp4
"}
浏览器直接打开得到的JSON
{"img":"
http://i1.hdslb.com/video/e1/e189bd6ac593b8a42ac2ea81e7caf72f.jpg","cid":"http://comment.bilibili.com/5071908.xml","src":"http://cn-jxnc1-dx.acgvideo.com/vg1/c/46/5071908.mp4?expires=1448026200&ssig=hnVyXyfaUPQMQcj1x85BgA&oi=1867408109&internal=1&rate=0
"}
出现这种情况的时候,find_video_address_normal_api 函数也会返回空值
强行使用 FAKE_HEADER 也是一样的
希望能够解决(
谢谢


Reply to this email directly or view it on GitHub
#23.

@cnbeining
Copy link
Owner

好吧是在下输了

改header好像这货不吃 就是大陆代理都不吃

如果有可能,请用-l DEBUG 敲一下详细日志,我看看到底这东西在想啥。有完整的浏览器发送返回header就更好了。

@cnbeining cnbeining self-assigned this Nov 20, 2015
@cnbeining cnbeining added the bug label Nov 20, 2015
@cnbeining
Copy link
Owner

问题还在么?(估计还在 但是我就没法复现)

@Sg4Dylan
Copy link
Author

现在是OK的了,有解析到地址了(
具体的DEBUG信息

C:\Users\cydyl\Desktop\Biligrab-master\Biligrab-master>python biligrab.py -a 3214525 -s 3 -l DEBUG
DEBUG:root:FAKE IP: 0
DEBUG:root:av_list
INFO:root:No part number set, download all the parts.
WARNING:root:Cannot read cookie, may affect some videos...
DEBUG:root:!!!!!!!!!!!!!!!!!!!!!!!
WARNING: This log contains some sensitive data. You may want to delete some part of the data before you post it publicly!
!!!!!!!!!!!!!!!!!!!!!!!
DEBUG:root:BILIGRAB_HEADER
!!!!!!!!!!!!!!!!!!!!!!!
WARNING: This log contains some sensitive data. You may want to delete some part of the data before you post it publicly!
!!!!!!!!!!!!!!!!!!!!!!!
=======================DUMP DATA==================
{
  "ip": "111.78.xx.xx",
  "hostname": "No Hostname",
  "city": "xx",
  "region": "xx",
  "country": "CN",
  "loc": "xx.5500,xx.9333",
  "org": "AS4134 xxxxxxxxxxxxxx"
}
========================DATA END==================
DEBUG: [3214525]
INFO:root:You are downloading all the parts in this video...
DEBUG:root:BiliURL: https://api.bilibili.com/view?appkey=85eb6835b0a1034e&id=3214525&type=xml&sign=fb026e64a155246b07a65ed748cce7ff
INFO:root:Fetching api to read video info...
DEBUG:root:<?xml version="1.0" encoding="UTF-8"?>
<info>
  <tid>33</tid>
  <typename>杩炶浇鍔ㄧ敾</typename>
  <play>39655</play>
  <review>210</review>
  <video_review>1123</video_review>
  <favorites>66</favorites>
  <title>銆?0鏈堛€戦粦鐧藉皬濮?绗笁瀛?07銆愮嫭瀹舵鐗堛€?/title>
  <allow_bp>1</allow_bp>
  <allow_feed>0</allow_feed>
  <allow_download>1</allow_download>
  <description>#07 </description>
  <tag>TV鍔ㄧ敾,榛戠櫧灏忓 绗笁瀛?BILIBILI姝g増,榛戠櫧灏忓,涓嶈烦OP,193E</tag>
  <pic>http://i1.hdslb.com/video/e1/e189bd6ac593b8a42ac2ea81e7caf72f.jpg</pic>
  <author>鍝斿摡鍝斿摡鐣墽</author>
  <mid>928123</mid>
  <face>http://i0.hdslb.com/user/9281/928123/myface.png</face>
  <pages>1</pages>
  <instant_server>chat.bilibili.com</instant_server>
  <created>1447428600</created>
  <created_at>2015-11-13 23:30</created_at>
  <credit>0</credit>
  <coins>63</coins>
  <spid>16203</spid>
  <src>c</src>
  <sp_title>榛戠櫧灏忓</sp_title>
  <season_id>2069</season_id>
  <season_index>7</season_index>
  <season_episode>7</season_episode>
  <bangumi>
    <bangumi_id>1788</bangumi_id>
    <season_id>2791</season_id>
    <title>榛戠櫧灏忓 绗笁瀛?/title>
    <allow_download>1</allow_download>
  </bangumi>
  <cid>5071908</cid>
  <partname></partname>
  <offsite>http://share.acg.tv/flash.swf?aid=3214525&amp;amp;page=1</offsite>
</info>

DEBUG:root:Bilibili API: <?xml version="1.0" encoding="UTF-8"?>
<info>
  <tid>33</tid>
  <typename>杩炶浇鍔ㄧ敾</typename>
  <play>39655</play>
  <review>210</review>
  <video_review>1123</video_review>
  <favorites>66</favorites>
  <title>銆?0鏈堛€戦粦鐧藉皬濮?绗笁瀛?07銆愮嫭瀹舵鐗堛€?/title>
  <allow_bp>1</allow_bp>
  <allow_feed>0</allow_feed>
  <allow_download>1</allow_download>
  <description>#07 </description>
  <tag>TV鍔ㄧ敾,榛戠櫧灏忓 绗笁瀛?BILIBILI姝g増,榛戠櫧灏忓,涓嶈烦OP,193E</tag>
  <pic>http://i1.hdslb.com/video/e1/e189bd6ac593b8a42ac2ea81e7caf72f.jpg</pic>
  <author>鍝斿摡鍝斿摡鐣墽</author>
  <mid>928123</mid>
  <face>http://i0.hdslb.com/user/9281/928123/myface.png</face>
  <pages>1</pages>
  <instant_server>chat.bilibili.com</instant_server>
  <created>1447428600</created>
  <created_at>2015-11-13 23:30</created_at>
  <credit>0</credit>
  <coins>63</coins>
  <spid>16203</spid>
  <src>c</src>
  <sp_title>榛戠櫧灏忓</sp_title>
  <season_id>2069</season_id>
  <season_index>7</season_index>
  <season_episode>7</season_episode>
  <bangumi>
    <bangumi_id>1788</bangumi_id>
    <season_id>2791</season_id>
    <title>榛戠櫧灏忓 绗笁瀛?/title>
    <allow_download>1</allow_download>
  </bangumi>
  <cid>5071908</cid>
  <partname></partname>
  <offsite>http://share.acg.tv/flash.swf?aid=3214525&amp;amp;page=1</offsite>
</info>

INFO:root:cid is 5071908
INFO:root:partname is
WARNING:root:Cannot connect to API server!
If you think this is wrong, please open an issue at
https://github.com/cnbeining/Biligrab/issues with *ALL* the screen output,
as well as your IP address and basic system info.
You can get these data via "-l".
DEBUG:root:API Data: <?xml version="1.0" encoding="UTF-8"?>
<info>
  <tid>33</tid>
  <typename>杩炶浇鍔ㄧ敾</typename>
  <play>39655</play>
  <review>210</review>
  <video_review>1123</video_review>
  <favorites>66</favorites>
  <title>銆?0鏈堛€戦粦鐧藉皬濮?绗笁瀛?07銆愮嫭瀹舵鐗堛€?/title>
  <allow_bp>1</allow_bp>
  <allow_feed>0</allow_feed>
  <allow_download>1</allow_download>
  <description>#07 </description>
  <tag>TV鍔ㄧ敾,榛戠櫧灏忓 绗笁瀛?BILIBILI姝g増,榛戠櫧灏忓,涓嶈烦OP,193E</tag>
  <pic>http://i1.hdslb.com/video/e1/e189bd6ac593b8a42ac2ea81e7caf72f.jpg</pic>
  <author>鍝斿摡鍝斿摡鐣墽</author>
  <mid>928123</mid>
  <face>http://i0.hdslb.com/user/9281/928123/myface.png</face>
  <pages>1</pages>
  <instant_server>chat.bilibili.com</instant_server>
  <created>1447428600</created>
  <created_at>2015-11-13 23:30</created_at>
  <credit>0</credit>
  <coins>63</coins>
  <spid>16203</spid>
  <src>c</src>
  <sp_title>榛戠櫧灏忓</sp_title>
  <season_id>2069</season_id>
  <season_index>7</season_index>
  <season_episode>7</season_episode>
  <bangumi>
    <bangumi_id>1788</bangumi_id>
    <season_id>2791</season_id>
    <title>榛戠櫧灏忓 绗笁瀛?/title>
    <allow_download>1</allow_download>
  </bangumi>
  <cid>5071908</cid>
  <partname></partname>
  <offsite>http://share.acg.tv/flash.swf?aid=3214525&amp;amp;page=1</offsite>
</info>

WARNING:root:Cannot read higher!
INFO:root:Your target download is av3214525, part 1~, from source 3
INFO:root:Downloading part 1 ...
DEBUG:root:ffmpeg, aria2c
DEBUG:root:BiliURL: https://api.bilibili.com/view?appkey=85eb6835b0a1034e&id=3214525&type=xml&sign=fb026e64a155246b07a65ed748cce7ff
INFO:root:Fetching api to read video info...
DEBUG:root:<?xml version="1.0" encoding="UTF-8"?>
<info>
  <tid>33</tid>
  <typename>杩炶浇鍔ㄧ敾</typename>
  <play>39655</play>
  <review>210</review>
  <video_review>1123</video_review>
  <favorites>66</favorites>
  <title>銆?0鏈堛€戦粦鐧藉皬濮?绗笁瀛?07銆愮嫭瀹舵鐗堛€?/title>
  <allow_bp>1</allow_bp>
  <allow_feed>0</allow_feed>
  <allow_download>1</allow_download>
  <description>#07 </description>
  <tag>TV鍔ㄧ敾,榛戠櫧灏忓 绗笁瀛?BILIBILI姝g増,榛戠櫧灏忓,涓嶈烦OP,193E</tag>
  <pic>http://i1.hdslb.com/video/e1/e189bd6ac593b8a42ac2ea81e7caf72f.jpg</pic>
  <author>鍝斿摡鍝斿摡鐣墽</author>
  <mid>928123</mid>
  <face>http://i0.hdslb.com/user/9281/928123/myface.png</face>
  <pages>1</pages>
  <instant_server>chat.bilibili.com</instant_server>
  <created>1447428600</created>
  <created_at>2015-11-13 23:30</created_at>
  <credit>0</credit>
  <coins>63</coins>
  <spid>16203</spid>
  <src>c</src>
  <sp_title>榛戠櫧灏忓</sp_title>
  <season_id>2069</season_id>
  <season_index>7</season_index>
  <season_episode>7</season_episode>
  <bangumi>
    <bangumi_id>1788</bangumi_id>
    <season_id>2791</season_id>
    <title>榛戠櫧灏忓 绗笁瀛?/title>
    <allow_download>1</allow_download>
  </bangumi>
  <cid>5071908</cid>
  <partname></partname>
  <offsite>http://share.acg.tv/flash.swf?aid=3214525&amp;amp;page=1</offsite>
</info>

DEBUG:root:Bilibili API: <?xml version="1.0" encoding="UTF-8"?>
<info>
  <tid>33</tid>
  <typename>杩炶浇鍔ㄧ敾</typename>
  <play>39655</play>
  <review>210</review>
  <video_review>1123</video_review>
  <favorites>66</favorites>
  <title>銆?0鏈堛€戦粦鐧藉皬濮?绗笁瀛?07銆愮嫭瀹舵鐗堛€?/title>
  <allow_bp>1</allow_bp>
  <allow_feed>0</allow_feed>
  <allow_download>1</allow_download>
  <description>#07 </description>
  <tag>TV鍔ㄧ敾,榛戠櫧灏忓 绗笁瀛?BILIBILI姝g増,榛戠櫧灏忓,涓嶈烦OP,193E</tag>
  <pic>http://i1.hdslb.com/video/e1/e189bd6ac593b8a42ac2ea81e7caf72f.jpg</pic>
  <author>鍝斿摡鍝斿摡鐣墽</author>
  <mid>928123</mid>
  <face>http://i0.hdslb.com/user/9281/928123/myface.png</face>
  <pages>1</pages>
  <instant_server>chat.bilibili.com</instant_server>
  <created>1447428600</created>
  <created_at>2015-11-13 23:30</created_at>
  <credit>0</credit>
  <coins>63</coins>
  <spid>16203</spid>
  <src>c</src>
  <sp_title>榛戠櫧灏忓</sp_title>
  <season_id>2069</season_id>
  <season_index>7</season_index>
  <season_episode>7</season_episode>
  <bangumi>
    <bangumi_id>1788</bangumi_id>
    <season_id>2791</season_id>
    <title>榛戠櫧灏忓 绗笁瀛?/title>
    <allow_download>1</allow_download>
  </bangumi>
  <cid>5071908</cid>
  <partname></partname>
  <offsite>http://share.acg.tv/flash.swf?aid=3214525&amp;amp;page=1</offsite>
</info>

INFO:root:cid is 5071908
INFO:root:partname is
INFO:root:Title is 【10月】黑白小姐 第三季 07【独家正版】
INFO:root:Total pages is 1
INFO:root:Fetching XML...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 34986  100 34986    0     0  1102k      0 --:--:-- --:--:-- --:--:-- 1102k
INFO:root:The XML file, 1 - 【10月】黑白小姐 第三季 07【独家正版】.xml should be ready...enjoy!
INFO:root:Finding video location...
INFO:root:Trying to get download URL...
DEBUG:root:{"img":"http://i1.hdslb.com/video/e1/e189bd6ac593b8a42ac2ea81e7caf72f.jpg","cid":"http://comment.bilibili.com/5071908.xml","src":"http://cn-jxnc1-dx.acgvideo.com/vg1/c/46/5071908.mp4?expires=1452998400&ssig=s4DgEDoQWSaAIspAnyQR1w&oi=1867407771&internal=1&rate=0"}
INFO:root:1 videos in part 1 to download, fetch yourself a cup of coffee...
INFO:root:Downloading #0...
DEBUG:root:aria2c -c -U "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.52 Safari/537.36" -s16 -x16 -k1M --out 0.flv "http://cn-jxnc1-dx.acgvideo.com/vg1/c/46/5071908.mp4?expires=1452998400&ssig=s4DgEDoQWSaAIspAnyQR1w&oi=1867407771&internal=1&rate=0"
'aria2c' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
DEBUG:root:file 'C:\Users\cydyl\Desktop\Biligrab-master\Biligrab-master\【10月】黑白小姐 第三季 07【独家正版】/0.flv'

INFO:root:Concating videos...
'ffmpeg' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
ERROR: Cannot concatenate files, trying to make flv...
'ffmpeg' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
ERROR:root:Cannot concatenate files!
INFO:root:Converting danmaku to ASS file with danmaku2ass(py2)...
INFO:root:Trying to get resolution...
INFO:root:Resolution is 1280x720
INFO:root:INFO: The ASS file should be ready!
INFO:root:Part Done!

@cnbeining
Copy link
Owner

这个问题常见于他的后端服务器坑爹。

没什么我们能做的 我们能做的就是。。。不用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants