Commit e2547b5c authored by Julien Veyssier's avatar Julien Veyssier Committed by Romain Bignon

[imdb] fix : python datetime is locale-dependent, waiting for better fix

parent a47ec4b5
......@@ -125,7 +125,24 @@ class ImdbBrowser(Browser):
if m:
duration = int(m.group(1))
if 'Released' in jres:
release_date = datetime.strptime(str(jres['Released']), '%d %b %Y')
months = {
'Jan':'01',
'Feb':'02',
'Mar':'03',
'Apr':'04',
'May':'05',
'Jun':'06',
'Jul':'07',
'Aug':'08',
'Sep':'09',
'Oct':'10',
'Nov':'11',
'Dec':'12',
}
released_string = str(jres['Released'])
for st in months:
released_string = released_string.replace(st,months[st])
release_date = datetime.strptime(released_string, '%d %m %Y')
if 'Country' in jres:
country = u''
for c in jres['Country'].split(', '):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment