[Google+] Failed #104

Closed
soimort opened this Issue Feb 12, 2013 · 5 comments

Projects

None yet

1 participant

@soimort
Owner

a regression of #43 ?

➜  you-get git:(master) ✗ you-get -i https://plus.google.com/photos/+%E5%B9%B3%E7%94%B0%E6%A2%A8%E5%A5%88/albums/5799535464359553601/5799535470986281010
Traceback (most recent call last):
  File "/usr/bin/you-get", line 9, in <module>
    load_entry_point('you-get==0.3.0', 'console_scripts', 'you-get')()
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/main.py", line 67, in main
    script_main('you-get', any_download, any_download_playlist)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/common.py", line 657, in script_main
    download_main(download, download_playlist, args, playlist, output_dir, merge, info_only)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/common.py", line 577, in download_main
    download(url, output_dir = output_dir, merge = merge, info_only = info_only)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/main.py", line 60, in any_download
    m.download(url, output_dir = output_dir, merge = merge, info_only = info_only)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/downloader/googleplus.py", line 49, in googleplus_download
    _, _, size = url_info(real_url)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/common.py", line 137, in url_info
    size = int(headers['content-length'])
TypeError: int() argument must be a string or a number, not 'NoneType'
@soimort soimort was assigned Feb 12, 2013
@soimort
Owner

Another related error (regression of #17 or #42 ?):

➜  you-get git:(master) ✗ you-get -i https://plus.google.com/+平田梨奈/posts/M8r9dbkZdet
Traceback (most recent call last):
  File "/usr/bin/you-get", line 9, in <module>
    load_entry_point('you-get==0.3.0', 'console_scripts', 'you-get')()
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/main.py", line 67, in main
    script_main('you-get', any_download, any_download_playlist)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/common.py", line 657, in script_main
    download_main(download, download_playlist, args, playlist, output_dir, merge, info_only)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/common.py", line 577, in download_main
    download(url, output_dir = output_dir, merge = merge, info_only = info_only)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/main.py", line 60, in any_download
    m.download(url, output_dir = output_dir, merge = merge, info_only = info_only)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/downloader/googleplus.py", line 49, in googleplus_download
    _, _, size = url_info(real_url)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/common.py", line 137, in url_info
    size = int(headers['content-length'])
TypeError: int() argument must be a string or a number, not 'NoneType'
@soimort
Owner

it seems Google uses chunked transfer-encoding randomly...

➜  you-get git:(master) ✗ ./you-get -i https://plus.google.com/+平田梨奈/posts/M8r9dbkZdet
>>> None wmv None
➜  you-get git:(master) ✗ ./you-get -i https://plus.google.com/+平田梨奈/posts/M8r9dbkZdet
>>> None wmv 61963983
➜  you-get git:(master) ✗ ./you-get -i https://plus.google.com/+平田梨奈/posts/M8r9dbkZdet
>>> video/x-flv flv 12172407
Video Site: plus.google.com
Title:      平田梨奈 - Google+ - はい!12期研究生のひらりーこと平田梨奈です♪
Type:       Flash video (video/x-flv)
Size:       11.61 MB (12172407 Bytes)

➜  you-get git:(master) ✗ ./you-get -i https://plus.google.com/+平田梨奈/posts/M8r9dbkZdet
>>> None wmv 61963983
Video Site: plus.google.com
Title:      平田梨奈 - Google+ - はい!12期研究生のひらりーこと平田梨奈です♪
Type:       Advanced Systems Format (video/x-ms-asf)
Size:       59.09 MB (61963983 Bytes)
@soimort
Owner

Another related error:

➜  you-get git:(master) ✗ you-get -i https://plus.google.com/photos/110547918216387313519/albums/posts/5840089065373863922
Traceback (most recent call last):
  File "/usr/bin/you-get", line 9, in <module>
    load_entry_point('you-get==0.3.0', 'console_scripts', 'you-get')()
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/main.py", line 67, in main
    script_main('you-get', any_download, any_download_playlist)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/common.py", line 657, in script_main
    download_main(download, download_playlist, args, playlist, output_dir, merge, info_only)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/common.py", line 577, in download_main
    download(url, output_dir = output_dir, merge = merge, info_only = info_only)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/main.py", line 60, in any_download
    m.download(url, output_dir = output_dir, merge = merge, info_only = info_only)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/downloader/googleplus.py", line 49, in googleplus_download
    _, _, size = url_info(real_url)
  File "/usr/lib/python3.3/site-packages/you_get-0.3.0-py3.3.egg/you_get/common.py", line 117, in url_info
    response = request.urlopen(request.Request(url))
  File "/usr/lib/python3.3/urllib/request.py", line 160, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.3/urllib/request.py", line 479, in open
    response = meth(req, response)
  File "/usr/lib/python3.3/urllib/request.py", line 591, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.3/urllib/request.py", line 517, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.3/urllib/request.py", line 451, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.3/urllib/request.py", line 599, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request
@soimort soimort added a commit that referenced this issue Feb 12, 2013
@soimort Google+: dirty fix #103, #104 4aaa73d
@soimort
Owner

Problem solved. but definitely need some further cleanup on the code.

@soimort soimort closed this Feb 12, 2013
@soimort
Owner

it is weird that the size of G+ video changes all the time...

➜  you-get git:(master) ✗ ./you-get -i https://plus.google.com/+平田梨奈/posts/M8r9dbkZdet 
Video Site: plus.google.com
Title:      平田梨奈 - Google+ - はい!12期研究生のひらりーこと平田梨奈です♪
Type:       Advanced Systems Format (video/x-ms-asf)
Size:       99.07 MB (103880840 Bytes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment