bellingcat / wayback-google-analytics

A lightweight tool for scraping current and historic Google Analytics data

Home Page:https://pypi.org/project/wayback-google-analytics/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to retrieve any codes

octner opened this issue · comments

Hello, the tool only occasionally retrieves relevant codes from webarchive -- otherwise the output is empty:

wayback-google-analytics -u https://yapatriot.ru https://zanogu.com https://whoswho.com.ua https://adamants.ru -s 01/01/2015 -f yearly -o xlsx

Gave me this:

[{'https://yapatriot.ru': {'archived_UA_codes': {'UA-65087228-1': {'first_seen': '20/01/2017:03:55', 'last_seen': '30/06/2019:05:32'}, 'UA-53176102-14': {'first_seen': '15/06/2015:19:36', 'last_seen': '15/06/2015:19:36'}}, 'archived_GA_codes': {}, 'archived_GTM_codes': {}}}, {'https://zanogu.com': {'current_UA_code': [], 'current_GA_code': [], 'current_GTM_code': [], 'archived_UA_codes': {}, 'archived_GA_codes': {}, 'archived_GTM_codes': {}}}, {'https://whoswho.com.ua': {'current_UA_code': [], 'current_GA_code': [], 'current_GTM_code': [], 'archived_UA_codes': {}, 'archived_GA_codes': {}, 'archived_GTM_codes': {}}}, {'https://adamants.ru': {'archived_UA_codes': {}, 'archived_GA_codes': {}, 'archived_GTM_codes': {}}}]

And this:

[{'https://yapatriot.ru': {'archived_UA_codes': {}, 'archived_GA_codes': {}, 'archived_GTM_codes': {}}}, {'https://zanogu.com': {'current_UA_code': [], 'current_GA_code': [], 'current_GTM_code': [], 'archived_UA_codes': {}, 'archived_GA_codes': {}, 'archived_GTM_codes': {}}}, {'https://whoswho.com.ua': {'current_UA_code': [], 'current_GA_code': [], 'current_GTM_code': [], 'archived_UA_codes': {}, 'archived_GA_codes': {}, 'archived_GTM_codes': {}}}, {'https://adamants.ru': {'archived_UA_codes': {}, 'archived_GA_codes': {}, 'archived_GTM_codes': {}}}]

on two separate runs. I was able to retrieve UA for zanogu.com and none of the others on another try. No error messages are displayed in the process; I ran the tool on two virtual environments and a remote machine.

Running it 12 hours later worked and I managed to collect some archived and current codes for my list.

Closing this for now, it's likely related to how the wayback machine is handling requests.