kopia lustrzana https://codeberg.org/edent/Mastodon_Tools
Fucking leap years2
rodzic
2fd688da74
commit
fd0c309f7f
|
@ -27,6 +27,7 @@ while (year_counter >= year_joined ) :
|
|||
year_counter -= 1
|
||||
# The end of today is the start of tomorrow
|
||||
# This means yesterday can take into account leap-years
|
||||
try:
|
||||
today_end = datetime(year_counter, month_now, day_now, 00, 00) + timedelta(days=1)
|
||||
yesterday_end = today_end - timedelta(days=1)
|
||||
# Bitwise shift the integer representation and convert to milliseconds
|
||||
|
@ -39,3 +40,6 @@ while (year_counter >= year_joined ) :
|
|||
# Print the date and URl
|
||||
for status in all_statuses :
|
||||
print( str(status["created_at"])[:16] + " " + BeautifulSoup(status["content"], features="html.parser").get_text() + " - " + status["uri"] + "\n")
|
||||
except:
|
||||
print( str(year_counter) + " is not a leap year.")
|
||||
|
Ładowanie…
Reference in New Issue