Skip to content

Commit

Permalink
Added deprecation comment to blip_fixer.py script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Burt committed Oct 13, 2011
1 parent 817845e commit 414972e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion akvo/blip_fixer.py
Expand Up @@ -19,11 +19,18 @@ def get_new_url(url):
Returns a new-style URL string or None Returns a new-style URL string or None
IMPORTANT:
This, in fact, doesn't work because new-style URLs cannot be predicted based
on anything in the old URL.
This script should be deprecated.
""" """
parsed_url = urlparse(url) parsed_url = urlparse(url)
if parsed_url.netloc.endswith('.blip.tv'): # matches *.blip.tv but not ^blip.tv if parsed_url.netloc.endswith('.blip.tv'): # matches *.blip.tv but not ^blip.tv
user, video_id = parsed_url.netloc.split('.')[0], parsed_url.path user, video_id = parsed_url.netloc.split('.')[0], parsed_url.path
return u'http://blip.tv/%s/%s' % (user, video_id) return u'http://blip.tv/%s%s' % (user, video_id)
return return




Expand Down

0 comments on commit 414972e

Please sign in to comment.