summaryrefslogtreecommitdiffabout
authorWojciech Polak <polak@gnu.org>2016-02-15 22:21:05 (GMT)
committer Wojciech Polak <polak@gnu.org>2016-02-15 22:21:05 (GMT)
commit1cf6c9b9eb1b170a37f542c6e43f9ac6a62e6531 (patch) (side-by-side diff)
treef8acbd4f67fb16d74d8b98c5c06aa8b7e778499c
parentb7536e1ba516f97b5de8bbae5762e02196644bef (diff)
downloadglifestream-1cf6c9b9eb1b170a37f542c6e43f9ac6a62e6531.tar.gz
glifestream-1cf6c9b9eb1b170a37f542c6e43f9ac6a62e6531.tar.bz2
Update Instagram URL
Diffstat (more/less context) (ignore whitespace changes)
-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 @@
-# gLifestream Copyright (C) 2009-2015 Wojciech Polak
+# gLifestream Copyright (C) 2009-2016 Wojciech Polak
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
@@ -60,8 +60,8 @@ def __sp_twitpic(m):
def __sp_instagram(m):
- url = media.save_image('https://%s/p/%s/media/?size=t' %
- (m.group(1), m.group(2)), downscale=True)
+ url = media.save_image('https://www.instagram.com/p/%s/media/?size=t' %
+ m.group(3), downscale=True)
return __gen_tai(m.group(0), url)
@@ -89,7 +89,7 @@ def shortpics(s):
"""Expand short picture-URLs."""
s = re.sub(r'https?://(www\.)?(twitpic\.com)/(\w+)', __sp_twitpic, s)
s = re.sub(r'https?://(instagr\.am)/p/([\w\-]+)/?', __sp_instagram, s)
- s = re.sub(r'https?://(instagram\.com)/p/([\w\-]+)/?', __sp_instagram, s)
+ s = re.sub(r'https?://(www\.)?(instagram\.com)/p/([\w\-]+)/?', __sp_instagram, s)
s = re.sub(r'https?://(yfrog\.com)/(\w+)', __sp_yfrog, s)
s = re.sub(r'https?://(www\.)?flickr\.com/([\w\.\-/]+)', __sp_flickr, s)
return s

Return to:

Send suggestions and report system problems to the System administrator.