Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB download does not exist due to date tick over #6

Open
rayleroux opened this issue Feb 1, 2021 · 1 comment
Open

DB download does not exist due to date tick over #6

rayleroux opened this issue Feb 1, 2021 · 1 comment

Comments

@rayleroux
Copy link

rayleroux commented Feb 1, 2021

"Error trying to download DB-IP lite geoip csv file. Bailing out..." when trying to download free DB as 2021-02 does not exist yet.

I've modified it to get 2021-01 but to add some resiliency to the script you could attempt the previous month on failure.

This is the line where the problem exists.

url = 'https://download.db-ip.com/free/dbip-country-lite-{}.csv.gz'.format(time.strftime("%Y-%m"))

@pvxe
Copy link
Owner

pvxe commented Feb 2, 2021

Handling this case may seem reasonable. But testing with the past month database would be useless if data is outdated, wouldn't it?. I imagine that some of the cidr do not change its geolocation data that frequently but I have no experience nor knowledge to prove so.

I agree that the script being unusable first day of the month is weird. I'll look into it (the moment I get some more free time). If no better idea comes to mind it could be patched with yours.

Thank you for reporting this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants