diff --git a/searx/engines/9gag.py b/searx/engines/9gag.py index 962e0af64..5d1b6a6bd 100644 --- a/searx/engines/9gag.py +++ b/searx/engines/9gag.py @@ -51,7 +51,7 @@ def response(resp): 'url': result['url'], 'title': result['title'], 'content': result['description'], - 'publishedDate': datetime.utcfromtimestamp(result['creationTs']), + 'publishedDate': datetime.fromtimestamp(result['creationTs']), 'img_src': result['images']['image700']['url'], 'thumbnail_src': thumbnail, } @@ -63,7 +63,7 @@ def response(resp): 'url': result['url'], 'title': result['title'], 'content': result['description'], - 'publishedDate': datetime.utcfromtimestamp(result['creationTs']), + 'publishedDate': datetime.fromtimestamp(result['creationTs']), 'thumbnail': thumbnail, 'iframe_src': result['images'].get('image460sv', {}).get('url'), } diff --git a/searx/engines/bilibili.py b/searx/engines/bilibili.py index f3436d3a7..06e1cddb2 100644 --- a/searx/engines/bilibili.py +++ b/searx/engines/bilibili.py @@ -82,7 +82,7 @@ def response(resp): video_id = item["aid"] unix_date = item["pubdate"] - formatted_date = datetime.utcfromtimestamp(unix_date) + formatted_date = datetime.fromtimestamp(unix_date) formatted_duration = format_duration(item["duration"]) iframe_url = f"https://player.bilibili.com/player.html?aid={video_id}&high_quality=1&autoplay=false&danmaku=0" diff --git a/searx/engines/bpb.py b/searx/engines/bpb.py index d6ad7f909..b28fa5895 100644 --- a/searx/engines/bpb.py +++ b/searx/engines/bpb.py @@ -51,7 +51,7 @@ def response(resp): publishedDate = None if result['extension'].get('publishingDate'): - publishedDate = datetime.utcfromtimestamp(result['extension']['publishingDate']) + publishedDate = datetime.fromtimestamp(result['extension']['publishingDate']) results.append( { diff --git a/searx/engines/duckduckgo_extra.py b/searx/engines/duckduckgo_extra.py index 6b0d4b98c..8c4a0b0d8 100644 --- a/searx/engines/duckduckgo_extra.py +++ b/searx/engines/duckduckgo_extra.py @@ -128,7 +128,7 @@ def _news_result(result): 'title': result['title'], 'content': result['excerpt'], 'source': result['source'], - 'publishedDate': datetime.utcfromtimestamp(result['date']), + 'publishedDate': datetime.fromtimestamp(result['date']), } diff --git a/searx/engines/findthatmeme.py b/searx/engines/findthatmeme.py index 2e7b21611..446bd47f8 100644 --- a/searx/engines/findthatmeme.py +++ b/searx/engines/findthatmeme.py @@ -38,7 +38,7 @@ def response(resp): img = 'https://s3.thehackerblog.com/findthatmeme/' + item['image_path'] thumb = 'https://s3.thehackerblog.com/findthatmeme/thumb/' + item.get('thumbnail', '') date = datetime.strptime(item["updated_at"].split("T")[0], "%Y-%m-%d") - formatted_date = datetime.utcfromtimestamp(date.timestamp()) + formatted_date = datetime.fromtimestamp(date.timestamp()) results.append( { diff --git a/searx/engines/hackernews.py b/searx/engines/hackernews.py index d3ba47f65..46c8cae8d 100644 --- a/searx/engines/hackernews.py +++ b/searx/engines/hackernews.py @@ -87,7 +87,7 @@ def response(resp): "content": hit.get("url") or hit.get("comment_text") or hit.get("story_text") or "", "metadata": metadata, "author": hit["author"], - "publishedDate": datetime.utcfromtimestamp(hit["created_at_i"]), + "publishedDate": datetime.fromtimestamp(hit["created_at_i"]), } ) diff --git a/searx/engines/odysee.py b/searx/engines/odysee.py index 595c92b47..37a28d1d2 100644 --- a/searx/engines/odysee.py +++ b/searx/engines/odysee.py @@ -88,7 +88,7 @@ def response(resp): duration = item["duration"] release_date = datetime.strptime(release_time.split("T")[0], "%Y-%m-%d") - formatted_date = datetime.utcfromtimestamp(release_date.timestamp()) + formatted_date = datetime.fromtimestamp(release_date.timestamp()) url = f"https://odysee.com/{name}:{claim_id}" iframe_url = f"https://odysee.com/$/embed/{name}:{claim_id}" diff --git a/searx/engines/open_meteo.py b/searx/engines/open_meteo.py index 66817d5c9..c1b0ca567 100644 --- a/searx/engines/open_meteo.py +++ b/searx/engines/open_meteo.py @@ -112,7 +112,7 @@ def response(resp): table_content = generate_condition_table(hourly_data) - infobox += f"