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:
committed by
GitHub
parent
f59390815c
commit
1022d8f816
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user