podcast: fallback pubDate parsing method

This commit is contained in:
boyska 2021-04-24 01:17:17 +02:00
parent 924615b282
commit e9a37cf0f2

View file

@ -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):