-
Notifications
You must be signed in to change notification settings - Fork 297
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
FIX: Fixes update-database script on the last few days of a month. #2121
Conversation
url += str(months[i]) + "/RIBS/" | ||
response = session.get(url) | ||
pattern = re.compile(r"href=\"(rib\.\d{8}\.\d{4}\.bz2)\"") | ||
days = pattern.findall(response.text) | ||
days.sort(reverse=True) | ||
if days: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url += str(months[i]) + "/RIBS/" | |
response = session.get(url) | |
pattern = re.compile(r"href=\"(rib\.\d{8}\.\d{4}\.bz2)\"") | |
days = pattern.findall(response.text) | |
days.sort(reverse=True) | |
if days: | |
new_url = url + str(months[i]) + "/RIBS/" | |
response = session.get(new_url) | |
pattern = re.compile(r"href=\"(rib\.\d{8}\.\d{4}\.bz2)\"") | |
days = pattern.findall(response.text) | |
days.sort(reverse=True) | |
if days: | |
url = new_url |
Otherwise we end up with no result as http://archive.routeviews.org/route-views4/bgpdata/2021.11/RIBS/2021.10/RIBS/ is queried.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Sorry about bad PR. Should be fixed now.
e3a1d7a
to
d8ff651
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Pull Request looks semantically OK. The PR can be merged as soon as someone reviews and validates the exact code changes and documents the change in the changelog.
This should fix #2088.