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,7 +1,7 @@
-# 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
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
@@ -57,14 +57,14 @@ def __sp_twitpic(m):
url = media.save_image('http://%s/show/full/%s' %
(m.group(2), m.group(3)), downscale=True)
return __gen_tai(m.group(0), url)
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)
def __sp_yfrog(m):
url = media.save_image('http://%s/%s:iphone' %
(m.group(1), m.group(2)), downscale=True)
@@ -86,13 +86,13 @@ def __sp_imgloc(m):
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
def imgloc(s):

Return to:

Send suggestions and report system problems to the System administrator.