fixed release date
This commit is contained in:
@@ -309,6 +309,7 @@ data:
|
||||
return None
|
||||
|
||||
def _parse_published_date(self, root) -> Optional[str]:
|
||||
"""Parse publication date - return as YYYY-01-01 format"""
|
||||
publication_node_1 = root.xpath('//*[@id="content"]//*[@class="items"]/div/div[1]/text()')
|
||||
if not publication_node_1:
|
||||
publication_node = root.xpath('//*[@id="content"]//*[@class="items"]/div/div[2]/text()')
|
||||
@@ -318,7 +319,8 @@ data:
|
||||
for value in publication_node:
|
||||
m = re.search(r'(\d{4})', value)
|
||||
if m:
|
||||
return m.group(1)
|
||||
# Return as full date (January 1st of that year)
|
||||
return f"{m.group(1)}-01-01"
|
||||
return None
|
||||
|
||||
def _parse_rating(self, root) -> int:
|
||||
@@ -623,7 +625,10 @@ data:
|
||||
# Publication date
|
||||
pub_year = book_props.get('Kiadás éve', '').strip()
|
||||
if pub_year:
|
||||
match.publishedDate = pub_year
|
||||
# Extract just the year and format as full date
|
||||
year_match = re.search(r'(\d{4})', pub_year)
|
||||
if year_match:
|
||||
match.publishedDate = f"{year_match.group(1)}-01-01"
|
||||
|
||||
# Series
|
||||
series = book_props.get('Sorozat', '').strip()
|
||||
@@ -787,7 +792,6 @@ data:
|
||||
}
|
||||
return lang_map.get(lang.lower(), 'hu')
|
||||
---
|
||||
# Calibre-Web-Automated Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
|
||||
Reference in New Issue
Block a user