Skip to content

Commit

Permalink
Replace deprecated utcnow()
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotwutingfeng committed Mar 24, 2024
1 parent d0f58e9 commit 666f667
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
https://www.emta.ee/ariklient/registreerimine-ettevotlus/hasartmangukorraldajale/blokeeritud-hasartmangu
and writes them to a .txt blocklist
"""
import datetime
import logging
import re
from datetime import datetime

import requests
import tldextract
Expand All @@ -20,7 +20,7 @@ def current_datetime_str() -> str:
Returns:
str: Timestamp in strftime format "%d_%b_%Y_%H_%M_%S-UTC"
"""
return datetime.utcnow().strftime("%d_%b_%Y_%H_%M_%S-UTC")
return datetime.datetime.now(datetime.UTC).strftime("%d_%b_%Y_%H_%M_%S-UTC")


def clean_url(url: str) -> str:
Expand Down

0 comments on commit 666f667

Please sign in to comment.