egwoo / google_vs_graph Goto Github PK
View Code? Open in Web Editor NEWQuick project that uses Google Suggest API to build a graph of terms Google considers competitors
Quick project that uses Google Suggest API to build a graph of terms Google considers competitors
Hello, the code does not work with multiple keywords at the same time
ex. keyword1 keyword2 keyword3
referral to bad URL formatting:
/get_all_related/keyword1%20keyword2%20keyword3
instead of this
/get_all_related/keyword1+keyword2+keyword3
If the result returns keywords with accents then there is a problem:
- Running on http://127.0.0.1:80/ (Press CTRL+C to quit)
127.0.0.1 - - [13/Jul/2018 22:43:39] "GET / HTTP/1.1" 200 -
[2018-07-13 22:43:42,802] ERROR in app: Exception on /get_all_related/ecole [GET]
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\flask\app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\flask\app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\flask\app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\flask_compat.py", line 33, in reraise
raise value
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\flask\app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\flask\app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "C:\Users\Desktop\google_vs_graph\app.py", line 33, in get_all_related
for related in get_related(entity):
File "C:\Users\Desktop\google_vs_graph\app.py", line 20, in get_related
suggestions = json.loads(result.read())
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\json_init_.py", line 343, in loads
s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 54: invalid continuation byte
127.0.0.1 - - [13/Jul/2018 22:43:42] "GET /get_all_related/ecole HTTP/1.1" 500 -
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.