[imdb] fix : python datetime is locale-dependent, waiting for better fix
This commit is contained in:
parent
a47ec4b5cd
commit
e2547b5c84
1 changed files with 18 additions and 1 deletions
|
|
@ -125,7 +125,24 @@ class ImdbBrowser(Browser):
|
||||||
if m:
|
if m:
|
||||||
duration = int(m.group(1))
|
duration = int(m.group(1))
|
||||||
if 'Released' in jres:
|
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:
|
if 'Country' in jres:
|
||||||
country = u''
|
country = u''
|
||||||
for c in jres['Country'].split(', '):
|
for c in jres['Country'].split(', '):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue