diff options
author | Wojciech Polak <polak@gnu.org> | 2016-02-15 23:21:05 +0100 |
---|---|---|
committer | Wojciech Polak <polak@gnu.org> | 2016-02-15 23:21:05 +0100 |
commit | 1cf6c9b9eb1b170a37f542c6e43f9ac6a62e6531 (patch) | |
tree | f8acbd4f67fb16d74d8b98c5c06aa8b7e778499c | |
parent | b7536e1ba516f97b5de8bbae5762e02196644bef (diff) | |
download | glifestream-1cf6c9b9eb1b170a37f542c6e43f9ac6a62e6531.tar.gz glifestream-1cf6c9b9eb1b170a37f542c6e43f9ac6a62e6531.tar.bz2 |
Update Instagram URL
-rw-r--r-- | glifestream/filters/expand.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/glifestream/filters/expand.py b/glifestream/filters/expand.py index de5c715..b84c344 100644 --- a/glifestream/filters/expand.py +++ b/glifestream/filters/expand.py | |||
@@ -1,4 +1,4 @@ | |||
1 | # gLifestream Copyright (C) 2009-2015 Wojciech Polak | 1 | # gLifestream Copyright (C) 2009-2016 Wojciech Polak |
2 | # | 2 | # |
3 | # This program is free software; you can redistribute it and/or modify it | 3 | # This program is free software; you can redistribute it and/or modify it |
4 | # under the terms of the GNU General Public License as published by the | 4 | # under the terms of the GNU General Public License as published by the |
@@ -60,8 +60,8 @@ def __sp_twitpic(m): | |||
60 | 60 | ||
61 | 61 | ||
62 | def __sp_instagram(m): | 62 | def __sp_instagram(m): |
63 | url = media.save_image('https://%s/p/%s/media/?size=t' % | 63 | url = media.save_image('https://www.instagram.com/p/%s/media/?size=t' % |
64 | (m.group(1), m.group(2)), downscale=True) | 64 | m.group(3), downscale=True) |
65 | return __gen_tai(m.group(0), url) | 65 | return __gen_tai(m.group(0), url) |
66 | 66 | ||
67 | 67 | ||
@@ -89,7 +89,7 @@ def shortpics(s): | |||
89 | """Expand short picture-URLs.""" | 89 | """Expand short picture-URLs.""" |
90 | s = re.sub(r'https?://(www\.)?(twitpic\.com)/(\w+)', __sp_twitpic, s) | 90 | s = re.sub(r'https?://(www\.)?(twitpic\.com)/(\w+)', __sp_twitpic, s) |
91 | s = re.sub(r'https?://(instagr\.am)/p/([\w\-]+)/?', __sp_instagram, s) | 91 | s = re.sub(r'https?://(instagr\.am)/p/([\w\-]+)/?', __sp_instagram, s) |
92 | s = re.sub(r'https?://(instagram\.com)/p/([\w\-]+)/?', __sp_instagram, s) | 92 | s = re.sub(r'https?://(www\.)?(instagram\.com)/p/([\w\-]+)/?', __sp_instagram, s) |
93 | s = re.sub(r'https?://(yfrog\.com)/(\w+)', __sp_yfrog, s) | 93 | s = re.sub(r'https?://(yfrog\.com)/(\w+)', __sp_yfrog, s) |
94 | s = re.sub(r'https?://(www\.)?flickr\.com/([\w\.\-/]+)', __sp_flickr, s) | 94 | s = re.sub(r'https?://(www\.)?flickr\.com/([\w\.\-/]+)', __sp_flickr, s) |
95 | return s | 95 | return s |