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

优酷 下载随机 403 #1

Closed
yibu10 opened this issue Jun 2, 2016 · 6 comments
Closed

优酷 下载随机 403 #1

yibu10 opened this issue Jun 2, 2016 · 6 comments
Assignees
Labels

Comments

@yibu10
Copy link

yibu10 commented Jun 2, 2016

extractor.py", line 145, in download_normal
save_urls(urls, name, self.streams[stream_id]['container'])
File "/Users/freestyler/git/bitbucket/d-service/lib/python2.7/site-packages/ykdl/util/download.py", line 57, in save_urls
save_url(u, n)
File "/Users/freestyler/git/bitbucket/d-service/lib/python2.7/site-packages/ykdl/util/download.py", line 28, in save_url
response = urlopen(req, None)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
return self._call_chain(_args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(_args)
File "/System/Library/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)
urllib2.HTTPError: HTTP Error 403: Forbidden

多试几次又好了

@yibu10
Copy link
Author

yibu10 commented Jun 2, 2016

应该是下完一段OK, 下一段就403了。。

@zhangn1985 zhangn1985 self-assigned this Jun 2, 2016
@zhangn1985
Copy link
Collaborator

有测试URL吗?

@yibu10
Copy link
Author

yibu10 commented Jun 2, 2016

@zhangn1985
Copy link
Collaborator

zhangn1985 commented Jun 2, 2016

我知道youku 有一定概率404是因为转码还没完成。
先观察一下

@yaonizui
Copy link

虎牙直播提示、
site: Huya Live (虎牙直播)
title: 你是我的小丫小苹果~
Traceback (most recent call last):
File "E:\Python\Python35-32\lib\runpy.py", line 170, in run_module_as_main
"main", mod_spec)
File "E:\Python\Python35-32\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "G:\idm\ykdl-master_2\ykdl__main
.py", line 6, in
main()
File "G:\idm\ykdl-master_2\ykdl__init__.py", line 47, in main
m.download(u, args)
File "G:\idm\ykdl-master_2\ykdl\extractor.py", line 94, in download
self.download_normal()
File "G:\idm\ykdl-master_2\ykdl\extractor.py", line 119, in download_normal
self.print_info()
File "G:\idm\ykdl-master_2\ykdl\extractor.py", line 66, in print_info
print("artist: %s" % self.artist)
UnicodeEncodeError: 'gbk' codec can't encode character '\u2764' in position 29:
illegal multibyte sequence

@zhangn1985
Copy link
Collaborator

please use chcp 65001 to change current code page to unicode.

zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I77bff863d124282a27164c19dd9523e176bb508d
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
remove debug print in alive

for #1

Change-Id: I76ca613f352c56255934127cd7476fee2eaf3c5d
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I257922e3156319747e4727f0d4906b71c5d01448
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I50e972ecf6cc672ba0bc7f076fe5df339d91b389
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I577c8784442a9a8ef1d95f6474952e9fe980acc5
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: Ie8926329b723331b2cb6acf0ffa2fc3939895c2b
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I2be45c11520016af59f00747ff3151211dbe40ab
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: If51d89907470a8bb2d7549e9a09b710d9fda1f1a
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I77bff863d124282a27164c19dd9523e176bb508d
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
remove debug print in alive

for #1

Change-Id: I76ca613f352c56255934127cd7476fee2eaf3c5d
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I257922e3156319747e4727f0d4906b71c5d01448
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I50e972ecf6cc672ba0bc7f076fe5df339d91b389
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I577c8784442a9a8ef1d95f6474952e9fe980acc5
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: Ie8926329b723331b2cb6acf0ffa2fc3939895c2b
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I2be45c11520016af59f00747ff3151211dbe40ab
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: If51d89907470a8bb2d7549e9a09b710d9fda1f1a
Signed-off-by: ykdl <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I77bff863d124282a27164c19dd9523e176bb508d
Signed-off-by: Zhang Ning <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
remove debug print in alive

for #1

Change-Id: I76ca613f352c56255934127cd7476fee2eaf3c5d
Signed-off-by: Zhang Ning <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I257922e3156319747e4727f0d4906b71c5d01448
Signed-off-by: Zhang Ning <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I50e972ecf6cc672ba0bc7f076fe5df339d91b389
Signed-off-by: Zhang Ning <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I577c8784442a9a8ef1d95f6474952e9fe980acc5
Signed-off-by: Zhang Ning <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: Ie8926329b723331b2cb6acf0ffa2fc3939895c2b
Signed-off-by: Zhang Ning <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: I2be45c11520016af59f00747ff3151211dbe40ab
Signed-off-by: Zhang Ning <zhangn1985@gmail.com>
zhangn1985 pushed a commit that referenced this issue Apr 27, 2018
for #1

Change-Id: If51d89907470a8bb2d7549e9a09b710d9fda1f1a
Signed-off-by: Zhang Ning <zhangn1985@gmail.com>
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

3 participants