From e9a37cf0f2c1d5ca699abfd3798aef9414ef7e1f Mon Sep 17 00:00:00 2001 From: boyska Date: Sat, 24 Apr 2021 01:17:17 +0200 Subject: [PATCH] podcast: fallback pubDate parsing method --- larigira/audiogen_podcast.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/larigira/audiogen_podcast.py b/larigira/audiogen_podcast.py index 3ee7b77..a7c5d8d 100644 --- a/larigira/audiogen_podcast.py +++ b/larigira/audiogen_podcast.py @@ -5,6 +5,7 @@ import random import sys from subprocess import CalledProcessError, check_output +import dateutil.parser import requests from lxml import html from pytimeparse.timeparse import timeparse @@ -111,6 +112,7 @@ def get_item_date(el): return datetime.datetime.strptime(el_date.text, time_format) except: continue + return dateutil.parser.parse(el_date.text) def get_audio_from_item(item):