chrism91 / pygoogle Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/pygoogle
Automatically exported from code.google.com/p/pygoogle
The program works fine but after 3-4 times google find that it is a robot,not a
user agent so it returns error...How can i fix this problem ?
Original issue reported on code.google.com by [email protected]
on 8 Feb 2015 at 7:23
C:\Python>python pygoogle.py quake 3 arena
'NoneType' object has no attribute '__getitem__'
*Found 0 results*
Original issue reported on code.google.com by [email protected]
on 11 Oct 2013 at 1:03
What steps will reproduce the problem?
1. Run the following code in the python interpreter:
from pygoogle import pygoogle
a = []
for i in range(100):
a.append(pygoogle('hello world', pages=0).get_result_count()
What is the expected output? What do you see instead?
Eventually it will start spitting 'NoneType' object is not subscriptable
instead of continuing to return results.
What version of the product are you using? On what operating system?
Latest version on Ubuntu 11.04
Please provide any additional information below.
I know that this is a limitation of the Google Custom Search API, but I was
wondering where and how I can modify your module to add in an API key.
Thanks.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2011 at 10:02
What steps will reproduce the problem?
1. apply 2to3 to pygoogle.py
2. run script:
from pygoogle import pygoogle
g = pygoogle('quake 3 arena')
g.pages = 5
print(g.get_result_count())
print(g.get_urls()[0])
What is the expected output? What do you see instead?
Expected output: number of search results followed by a first result link
Seen output:
Traceback (most recent call last):
File "somepath", line 4, in <module>
print(g.get_result_count())
File "C:\Python33\lib\site-packages\pygoogle.py", line 189, in get_result_coun
t
search_results = self.__search__()
File "C:\Python33\lib\site-packages\pygoogle.py", line 106, in __search__
data = json.loads(search_results.read())#.decode('utf-8')) #by andervish 05.
05.2014
File "C:\Python33\lib\json\__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "C:\Python33\lib\json\decoder.py", line 352, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: can't use a string pattern on a bytes-like object
What version of the product are you using? On what operating system?
using r7 revision of pygoogle.py installed with r2 setup.py
Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64 bit
(AMD64)] on win32
Please provide any additional information below.
Suggested solution: on line 106 of pygoogle.py for Python3 change
data = json.loads(search_results.read())
to
data = json.loads(search_results.read().decode('utf-8'))
Original issue reported on code.google.com by [email protected]
on 4 May 2014 at 11:41
[deleted issue]
What steps will reproduce the problem?
1. install
root@pygoogle]# python setup.py install
running install
running build
running build_py
running install_lib
copying build/lib/pygoogle.py -> /usr/lib/python2.4/site-packages
byte-compiling /usr/lib/python2.4/site-packages/pygoogle.py to pygoogle.pyc
File "/usr/lib/python2.4/site-packages/pygoogle.py", line 146
finally:
^
SyntaxError: invalid syntax
Original issue reported on code.google.com by [email protected]
on 22 Jun 2013 at 9:42
What steps will reproduce the problem?
1. from pygoogle import pygooogle
2. g=pygoogle('news')
3. g.pages=2
4.g.get_urls
What is the expected output? What do you see instead?
expected:www.news.google.com,(other sources of news),
getting:<bound method pygoogle.get_urls of <pygoogle.pygoogle instance at
0x1018a5b90>>
What version of the product are you using? On what operating system?
python 2.7.8 system Mac ,OS:10.10 Os Yosemite
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 16 Sep 2014 at 5:55
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.