podcast: fallback pubDate parsing method
This commit is contained in:
parent
924615b282
commit
e9a37cf0f2
1 changed files with 2 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue