[postr/postr-0-12] Replace http with https for the flickr urls
- From: Germán Poó Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [postr/postr-0-12] Replace http with https for the flickr urls
- Date: Sat, 5 Jul 2014 20:48:42 +0000 (UTC)
commit 70e84833593d0c59f654fd70e85adb6aafc67783
Author: Alexander Alemayhu <alexander bitraf no>
Date: Mon Jun 30 11:53:51 2014 -0700
Replace http with https for the flickr urls
src/flickrest.py | 10 +++++-----
src/postr.py | 6 +++---
src/util.py | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/flickrest.py b/src/flickrest.py
index 8799aec..2d7c30a 100644
--- a/src/flickrest.py
+++ b/src/flickrest.py
@@ -41,7 +41,7 @@ class FlickrError(Exception):
SIZE_LARGE) = range (0, 5)
class Flickr:
- endpoint = "http://api.flickr.com/services/rest/?"
+ endpoint = "https://api.flickr.com/services/rest/?"
def __init__(self, api_key, secret, perms="read"):
self.__methods = {}
@@ -67,7 +67,7 @@ class Flickr:
def set_proxy(self, proxy):
# Handle proxies which are not URLs
if proxy and "://" not in proxy:
- proxy = "http://" + proxy
+ proxy = "https://" + proxy
self.proxy = proxy
def __repr__(self):
@@ -199,7 +199,7 @@ class Flickr:
}
self.logger.info("Calling upload")
- return client.getPage("http://api.flickr.com/services/upload/",
+ return client.getPage("https://api.flickr.com/services/upload/",
proxy=self.proxy, method="POST",
headers=headers, postdata=form).addCallback(self.__cb, "upload")
@@ -235,7 +235,7 @@ class Flickr:
keys = { 'perms': self.perms,
'frob': frob }
self.__sign(keys)
- url =
"http://flickr.com/services/auth/?api_key=%(api_key)s&perms=%(perms)s&frob=%(frob)s&api_sig=%(api_sig)s" %
keys
+ url =
"https://flickr.com/services/auth/?api_key=%(api_key)s&perms=%(perms)s&frob=%(frob)s&api_sig=%(api_sig)s" %
keys
return {'url': url, 'frob': frob}
return self.auth_getFrob().addCallback(gotFrob)
@@ -289,4 +289,4 @@ class Flickr:
elif size == SIZE_LARGE:
suffix = "_b"
- return "http://static.flickr.com/%s/%s_%s%s.jpg" % (photo.get("server"), photo.get("id"),
photo.get("secret"), suffix)
+ return "https://static.flickr.com/%s/%s_%s%s.jpg" % (photo.get("server"), photo.get("id"),
photo.get("secret"), suffix)
diff --git a/src/postr.py b/src/postr.py
index 08411c1..7786a19 100644
--- a/src/postr.py
+++ b/src/postr.py
@@ -180,11 +180,11 @@ class Postr (UniqueApp):
user = client.get_string("/system/http_proxy/authentication_user")
password = client.get_string("/system/http_proxy/authentication_password")
if user and user != "":
- url = "http://%s:%s %s:%d" % (user, password, host, port)
+ url = "https://%s:%s %s:%d" % (user, password, host, port)
else:
- url = "http://%s:%d" % (host, port)
+ url = "https://%s:%d" % (host, port)
else:
- url = "http://%s:%d" % (host, port)
+ url = "https://%s:%d" % (host, port)
self.flickr.set_proxy(url)
else:
diff --git a/src/util.py b/src/util.py
index cc8afb2..affd2ae 100644
--- a/src/util.py
+++ b/src/util.py
@@ -98,9 +98,9 @@ def get_buddyicon(flickr, data, size=48):
return load_thumb(page, size)
if int(data.get("iconfarm")) > 0:
- url = "http://farm%s.static.flickr.com/%s/buddyicons/%s.jpg" % (data.get("iconfarm"),
data.get("iconserver"), data.get("nsid"))
+ url = "https://farm%s.static.flickr.com/%s/buddyicons/%s.jpg" % (data.get("iconfarm"),
data.get("iconserver"), data.get("nsid"))
else:
- url = "http://www.flickr.com/images/buddyicon.jpg"
+ url = "https://www.flickr.com/images/buddyicon.jpg"
if __buddy_cache.has_key(url):
from twisted.internet import defer
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]