aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2016-02-15 23:21:05 +0100
committerWojciech Polak <polak@gnu.org>2016-02-15 23:21:05 +0100
commit1cf6c9b9eb1b170a37f542c6e43f9ac6a62e6531 (patch)
treef8acbd4f67fb16d74d8b98c5c06aa8b7e778499c
parentb7536e1ba516f97b5de8bbae5762e02196644bef (diff)
downloadglifestream-1cf6c9b9eb1b170a37f542c6e43f9ac6a62e6531.tar.gz
glifestream-1cf6c9b9eb1b170a37f542c6e43f9ac6a62e6531.tar.bz2
Update Instagram URL
-rw-r--r--glifestream/filters/expand.py8
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
62def __sp_instagram(m): 62def __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

Return to:

Send suggestions and report system problems to the System administrator.