Skip to content

Commit

Permalink
fix date of podcasts
Browse files Browse the repository at this point in the history
  • Loading branch information
dersphere committed Jan 30, 2013
1 parent b1cb2f5 commit ebe10ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/lib/api.py
Expand Up @@ -147,7 +147,11 @@ def __get_best_thumb(node):
return thumbs[0].get('label')

def __get_date(parent_node):
return parent_node.get('attributes', {}).get('label')
date_str = parent_node.get('label')
if not date_str:
return ''
y, m, d = date_str.split('T')[0].split('-')
return '%s.%s.%s' % (d, m, y)

return [{
'id': item['id']['attributes']['im:id'],
Expand Down

0 comments on commit ebe10ac

Please sign in to comment.