seanfrazier / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

Downloader.py not returning correct JSON object not working #565

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Follow installation steps
2. Run example-simple-download.py

What is the expected output? What do you see instead?
Downloader doesn't work -- isn't returning content back in JSON -- instead 
returning some temporarily moved statement

What version of the product are you using? On what operating system?
latest version of the example scripts and latest version of the google data 
python API as of 1/6/12

Please provide any additional information below.
A sample run:

C:\Users\XXXXX\Desktop\GoogleWebAPI>python example-simple-download.py
https://www.google.com/webmasters/tools/downloads-list?hl=en&siteUrl=neurolex.or
g/wiki  <--- spits out URL downloader.py hits
neurolex.org/wiki
<HTML>
<HEAD>
<TITLE>Moved Temporarily</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Temporarily</H1>
The document has moved <A HREF="https://www.google.com/webmasters/tools/home?hl=
en&amp;siteUrl=neurolex.org/wiki">here</A>.
</BODY>
</HTML> <-- result from the URL given above

Traceback (most recent call last):
  File "example-create-spreadsheet.py", line 186, in <module>
    downloader.DoDownload(website, selected_downloads)
  File "/home/arihant/Documents/rails_various/googlewebmaster/gdata-2.0.18/downloader.py", line 94, in DoDownload
    sites_json = json.loads(available)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Tried passing fully qualified domains as well getting the same output. One 
strange thing that is happening is that one the site that is added with an 
https full url with no data is working fine rest any other site is not working 
which are added in the account with all access. Please suggest

Original issue reported on code.google.com by arihant....@exateam.com on 31 Oct 2014 at 4:54

Attachments: