add another date option

This commit is contained in:
Avi Peretz 2018-12-30 22:25:04 +02:00
parent 89acfecb68
commit dfeed7fa42

View File

@ -188,6 +188,12 @@ class OdnoklassnikiIE(InfoExtractor):
upload_date_time = upload_date_time.replace(year=datetime.utcnow().year)
except:
pass
try:
upload_date_time = datetime.strptime(upload_date_str, '%d %B')
upload_date_time = upload_date_time.replace(year=datetime.utcnow().year)
except:
pass
try:
if upload_date_str.find(':') >=0:
hour_and_minutes = upload_date_str.split(' ')[-1]