python-cli/acfun-uploader-cli

Cookie方式上传有缺陷

Closed this issue · 6 comments

设置Cookie上传后,视频文件可以上传,但是点击发布后,未能发布该视频内容。
查看了下响应,有501错误,服务器端判定用户有问题。

Could you please paste your call stack & error details out? That would be helpful to diagnose.

Please find below info about acfun-uploader-cli and network response:

Debug info
14:04:35 - main - INFO - Debug is on
14:05:08 - acfun_uploader_cli.uploader - INFO - Checking user login status
14:05:34 - acfun_uploader_cli.uploader - DEBUG - Title: 欢迎
14:05:34 - acfun_uploader_cli.uploader - INFO - Login status: yes
14:05:34 - acfun_uploader_cli.uploader - INFO - Start to upload video
14:06:04 - acfun_uploader_cli.uploader - INFO - Fill video title: 15 DIY Candle Hacks to Light up Your Mood!! Home D
14:06:05 - acfun_uploader_cli.uploader - INFO - Select the video source type
14:06:05 - acfun_uploader_cli.uploader - INFO - Upload video cover: C:\15 DIY Candle Hacks to Light up Your Mood!! Home Decor by Blossom-zZNGuk5wMR8.jpg
14:06:20 - acfun_uploader_cli.uploader - INFO - Select the channel: [生活] - [手工·绘画]
14:06:30 - acfun_uploader_cli.uploader - INFO - Input the tags
14:06:30 - acfun_uploader_cli.uploader - INFO - Tag: [小技巧]
14:06:35 - acfun_uploader_cli.uploader - INFO - Tag: [生活]
14:06:40 - acfun_uploader_cli.uploader - INFO - Input the descriptions
14:06:50 - acfun_uploader_cli.uploader - INFO - Uploading video file: C:\15 DIY Candle Hacks to Light up Your Mood!! Home Decor by Blossom-zZNGuk5wMR8.mkv
14:06:50 - acfun_uploader_cli.uploader - INFO - Waiting for the upload progress completed
14:06:50 - acfun_uploader_cli.uploader - INFO - progress: 0%
14:06:50 - acfun_uploader_cli.uploader - INFO - Received notification: 正在创建视频
14:06:56 - acfun_uploader_cli.uploader - INFO - progress: 5%
14:07:01 - acfun_uploader_cli.uploader - INFO - progress: 9%
14:07:05 - acfun_uploader_cli.uploader - INFO - progress: 14%
14:07:09 - acfun_uploader_cli.uploader - INFO - progress: 18%
14:07:13 - acfun_uploader_cli.uploader - INFO - progress: 23%
14:07:17 - acfun_uploader_cli.uploader - INFO - progress: 28%
14:07:21 - acfun_uploader_cli.uploader - INFO - progress: 32%
14:07:25 - acfun_uploader_cli.uploader - INFO - progress: 37%
14:07:29 - acfun_uploader_cli.uploader - INFO - progress: 41%
14:07:33 - acfun_uploader_cli.uploader - INFO - progress: 46%
14:07:37 - acfun_uploader_cli.uploader - INFO - progress: 51%
14:07:41 - acfun_uploader_cli.uploader - INFO - progress: 55%
14:07:45 - acfun_uploader_cli.uploader - INFO - progress: 60%
14:07:49 - acfun_uploader_cli.uploader - INFO - progress: 64%
14:07:53 - acfun_uploader_cli.uploader - INFO - progress: 69%
14:07:57 - acfun_uploader_cli.uploader - INFO - progress: 74%
14:08:01 - acfun_uploader_cli.uploader - INFO - progress: 78%
14:08:05 - acfun_uploader_cli.uploader - INFO - progress: 83%
14:08:09 - acfun_uploader_cli.uploader - INFO - progress: 87%
14:08:13 - acfun_uploader_cli.uploader - INFO - progress: 92%
14:08:17 - acfun_uploader_cli.uploader - INFO - progress: 97%
14:08:20 - acfun_uploader_cli.uploader - INFO - progress: 100%
14:08:20 - acfun_uploader_cli.uploader - DEBUG - The uploads should be completed since the progress bar finished.
14:09:00 - acfun_uploader_cli.uploader - INFO - Upload video file [C:\Users\Administrator\PycharmProjects\Hamal_release\15 DIY Candle Hacks to Light up Your Mood!! Home Decor by Blossom-zZNGuk5wMR8.mkv] successfully.
14:09:03 - acfun_uploader_cli.uploader - INFO - Bye!

Process finished with exit code 0

Fiddle Capture Url Response Info

POST https://www.acfun.cn/contribute/video HTTP/1.1
Host: www.acfun.cn
Connection: keep-alive
Content-Length: 420
Accept: /
Origin: https://www.acfun.cn
X-Requested-With: XMLHttpRequest
Sec-Fetch-Dest: empty
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/80.0.3987.116 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Referer: https://www.acfun.cn/member/
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN
Cookie: hide info

title=15+DIY+Candle+Hacks+to+Light+up+Your+Mood!!+Home+D&description=balabala...&tagNames=%5B%22%E5%B0%8F%E6%8A%80%E5%B7%A7%22%2C%22%E7%94%9F%E6%B4%BB%22%5D&creationType=1&channelId=127&coverUrl=https%3A%2F%2Fimgs.aixifan.com%2Fo_1e45ic36q158c178c1gsqhlfrc80.jpeg&videoInfos=%5B%7B%22videoId%22%3A12007052%2C%22title%22%3A%22p1%22%2C%22isDeleted%22%3A0%7D%5D&isJoinUpCollege=0&publishTime=&certified=dDRpNTZpMmE2NQ%3D%3D
HTTP/1.1 501 Method Not Implemented
Server: Tengine
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Strict-Transport-Security: max-age=172800
Date: Tue, 24 Mar 2020 06:09:00 GMT
X-Powered-By: thinkjs-2.1.8
source_ip: 27.155.69.67
Ali-Swift-Global-Savetime: 1585030140
Via: cache47.l2cn1832[51,501-1281,M], cache47.l2cn1832[52,0], vcache4.cn1996[70,501-1281,M], vcache4.cn1996[72,0]
X-Swift-Error: orig response 5xx error
X-Cache: MISS TCP_MISS dirn:-2:-2
X-Swift-SaveTime: Tue, 24 Mar 2020 06:09:00 GMT
X-Swift-CacheTime: 1
X-Swift-Error: orig response 5xx error
Access-Control-Allow-Origin: https://www.acfun.cn
Timing-Allow-Origin: *
EagleId: b4a3791815850301407093297e
Content-Length: 38

{"code":-1,"msg":"用户校验失败"}


It should be fixed in 8b898eb.

bro, this issue is still there...
The uploaded video is not posted.

@jackforlit do you mean the auth error still exists or just didn't preview the video detail immediately?

  1. If the auth error still exists, try to disable the use_cookie (it's false by default) and rerun it, if it passes finally, that should be a upload issue instead of cookie related.
  2. If it confirms as an upload script issue, please let me known the future details. :)
  3. The uploaded video won't be published once finishing the uploading progress, actually. There are additional codec and review processes in their backend of site, you could check the progress in the old entry or the new entry.
  4. If there are some failures about the review issue, check your message center for details.

So, what's your not posted?

Lack of new activity, closed.