stephan765 / google-search-console-bulk-query Goto Github PK
View Code? Open in Web Editor NEWA script to iterate through the available filters on Google Search Console, minimising sampling issues by extracting each possible combination of filters.
A script to iterate through the available filters on Google Search Console, minimising sampling issues by extracting each possible combination of filters.
According to the article on MOZ there is an argument "pages"
python search_console_query.py https://www.distilled.net/ 2017-02-05 2017-02-06 --pages file_of_pages
But according to the code the real name of the argument is
--page_filters_file PAGE_FILTERS_FILE.
I want to know if we can implement pagination in this script as currently it run only one time and now Google search console api provide 25kresults/request Please help
Hi,
Is it possible to amend the script so it pulls out weekly from the Search Console instead of daily?
Thanks
I've been hitting the "api rate limit" during my tests, especially using an url file.
Is there a "maximum" amount of 5000 rows for the entire operation?
I've tried this specific case
python search_console_query.py https://www.xxxxxxx.it/ 2017-02-05 2017-02-06 --page_filters_file pages.txt --max-rows-per-day 5
The first day was processed completely and a csv file was created (even though there are 115 queries instead of over 500 listed per GSC).
the second day was processed at least until row 748 and then i got the api limit error and the script stopped.
Traceback (most recent call last):
File "search_console_query.py", line 281, in
main()
File "search_console_query.py", line 250, in main
response = execute_request(service, args.property_uri, request)
File "search_console_query.py", line 35, in rate_limited_function
ret = func(*args, **kwargs)
File "search_console_query.py", line 149, in execute_request
response = service.searchanalytics().query(siteUrl=property_uri, body=request).execute()
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/site-packages/googleapiclient/http.py", line 835, in execute
method=str(self.method), body=self.body, headers=self.headers)
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/site-packages/googleapiclient/http.py", line 162, in _retry_request
resp, content = http.request(uri, method, *args, **kwargs)
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/site-packages/oauth2client/transport.py", line 175, in new_request
redirections, connection_type)
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/site-packages/oauth2client/transport.py", line 282, in request
connection_type=connection_type)
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/site-packages/httplib2/init.py", line 1322, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/site-packages/httplib2/init.py", line 1072, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/site-packages/httplib2/init.py", line 1025, in _conn_request
response = conn.getresponse()
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/ssl.py", line 1002, in recv_into
return self.read(nbytes, buffer)
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/ssl.py", line 865, in read
return self._sslobj.read(len, buffer)
File "/Users/garethjax/miniconda3/envs/myenv/lib/python3.6/ssl.py", line 625, in read
v = self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 54] Connection reset by peer
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.