Produce correct timezone
This commit is contained in:
parent
0057693f28
commit
43cc7eceaf
|
@ -2,13 +2,10 @@ import dataclasses
|
||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import secrets
|
|
||||||
|
|
||||||
import bs4
|
import bs4
|
||||||
|
|
||||||
import personal_data.html_util
|
from ..data import DeduplicateMode, Scraper
|
||||||
import personal_data.parse_util
|
from .. import secrets, parse_util, html_util
|
||||||
from personal_data.data import DeduplicateMode, Scraper
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -37,11 +34,11 @@ class LodestoneAchievementScraper(Scraper):
|
||||||
response = self.session.get(url)
|
response = self.session.get(url)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
|
|
||||||
NOW = personal_data.parse_util.parse_response_datetime(response)
|
NOW = parse_util.parse_response_datetime(response)
|
||||||
|
|
||||||
# Parse data
|
# Parse data
|
||||||
soup = bs4.BeautifulSoup(response.content, 'lxml')
|
soup = bs4.BeautifulSoup(response.content, 'lxml')
|
||||||
soup = personal_data.html_util.normalize_soup_slightly(
|
soup = html_util.normalize_soup_slightly(
|
||||||
soup,
|
soup,
|
||||||
classes=False,
|
classes=False,
|
||||||
scripts=False,
|
scripts=False,
|
||||||
|
@ -54,7 +51,7 @@ class LodestoneAchievementScraper(Scraper):
|
||||||
time_acquired,
|
time_acquired,
|
||||||
).group(1)
|
).group(1)
|
||||||
time_acquired = int(time_acquired)
|
time_acquired = int(time_acquired)
|
||||||
time_acquired = datetime.datetime.fromtimestamp(time_acquired)
|
time_acquired = datetime.datetime.fromtimestamp(time_acquired,tz=datetime.UTC)
|
||||||
trophy_desc = (
|
trophy_desc = (
|
||||||
entry.select_one('.entry__activity__txt').get_text().strip()
|
entry.select_one('.entry__activity__txt').get_text().strip()
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user