1
Author: Alexander Alemayhu<alexander@bitraf.no>
2
Description: Replace http with https for the flickr urls.
7
@@ -82,7 +82,7 @@ class SetCombo(gtk.ComboBox):
9
1, photoset.find("title").text)
11
- url = "http://static.flickr.com/%s/%s_%s%s.jpg" % (photoset.get("server"), photoset.get("primary"), photoset.get("secret"), "_s")
12
+ url = "https://static.flickr.com/%s/%s_%s%s.jpg" % (photoset.get("server"), photoset.get("primary"), photoset.get("secret"), "_s")
13
getPage (url).addCallback(self.__got_set_thumb, it).addErrback(self.twisted_error)
16
--- a/src/flickrest.py
17
+++ b/src/flickrest.py
18
@@ -47,7 +47,7 @@ class FlickrError(Exception):
19
SIZE_LARGE) = range (0, 5)
22
- endpoint = "http://api.flickr.com/services/rest/?"
23
+ endpoint = "https://api.flickr.com/services/rest/?"
25
def __init__(self, api_key, secret, perms="read"):
27
@@ -73,7 +73,7 @@ class Flickr:
28
def set_proxy(self, proxy):
29
# Handle proxies which are not URLs
30
if proxy and "://" not in proxy:
31
- proxy = "http://" + proxy
32
+ proxy = "https://" + proxy
36
@@ -208,7 +208,7 @@ class Flickr:
39
self.logger.info("Calling upload")
40
- return client.upload("http://api.flickr.com/services/upload/",
41
+ return client.upload("https://api.flickr.com/services/upload/",
42
proxy=self.proxy, method="POST",
43
headers=headers, postdata=form,
44
progress_tracker=progress_tracker).addCallback(self.__cb, "upload")
45
@@ -245,7 +245,7 @@ class Flickr:
46
keys = { 'perms': self.perms,
49
- url = "http://flickr.com/services/auth/?api_key=%(api_key)s&perms=%(perms)s&frob=%(frob)s&api_sig=%(api_sig)s" % keys
50
+ url = "https://flickr.com/services/auth/?api_key=%(api_key)s&perms=%(perms)s&frob=%(frob)s&api_sig=%(api_sig)s" % keys
51
return {'url': url, 'frob': frob}
52
return self.auth_getFrob().addCallback(gotFrob)
54
@@ -299,4 +299,4 @@ class Flickr:
55
elif size == SIZE_LARGE:
58
- return "http://static.flickr.com/%s/%s_%s%s.jpg" % (photo.get("server"), photo.get("id"), photo.get("secret"), suffix)
59
+ return "https://static.flickr.com/%s/%s_%s%s.jpg" % (photo.get("server"), photo.get("id"), photo.get("secret"), suffix)
62
@@ -223,11 +223,11 @@ class Postr(UniqueApp):
63
user = client.get_string("/system/http_proxy/authentication_user")
64
password = client.get_string("/system/http_proxy/authentication_password")
65
if user and user != "":
66
- url = "http://%s:%s@%s:%d" % (user, password, host, port)
67
+ url = "https://%s:%s@%s:%d" % (user, password, host, port)
69
- url = "http://%s:%d" % (host, port)
70
+ url = "https://%s:%d" % (host, port)
72
- url = "http://%s:%d" % (host, port)
73
+ url = "https://%s:%d" % (host, port)
75
self.flickr.set_proxy(url)
79
@@ -98,9 +98,9 @@ def get_buddyicon(flickr, data, size=48)
80
return load_thumb(page, size)
82
if int(data.get("iconfarm")) > 0:
83
- url = "http://farm%s.static.flickr.com/%s/buddyicons/%s.jpg" % (data.get("iconfarm"), data.get("iconserver"), data.get("nsid"))
84
+ url = "https://farm%s.static.flickr.com/%s/buddyicons/%s.jpg" % (data.get("iconfarm"), data.get("iconserver"), data.get("nsid"))
86
- url = "http://www.flickr.com/images/buddyicon.jpg"
87
+ url = "https://www.flickr.com/images/buddyicon.jpg"
89
if __buddy_cache.has_key(url):
90
from twisted.internet import defer