Fix some lint warnings (#189)

Remove unused imports or variable, and apply suggestions from https://adamj.eu/tech/2019/09/12/how-i-import-pythons-datetime-module/.
This commit is contained in:
Hugo van Kemenade
2023-11-26 14:25:04 +02:00
committed by GitHub
parent f59390815c
commit 1022d8f816
5 changed files with 5 additions and 12 deletions

View File

@@ -25,7 +25,7 @@ for tr in soup.findAll("tr"):
td_list[1].get_text().strip(), "%B %d, %Y"
)
# The date is a suffix (May 23rd, 2020)
except ValueError as e:
except ValueError:
x = td_list[1].get_text().split(",")
date = datetime.datetime.strptime(x[0][:-2] + x[1], "%B %d %Y")
abs_date = date.strftime("%Y-%m-%d")