Skip to content

Commit 5a2804a

Browse files
committed
Flickr provider
1 parent 9a7fcda commit 5a2804a

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

myimgat/providers/flickr.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def load_default_photos(self, album):
117117
'page': 1
118118
}
119119

120-
result = urlopen(url).read()
120+
result = urlopen(page_url).read()
121121
result = loads(result)
122122

123123
def parse_results(items):
@@ -139,7 +139,7 @@ def parse_results(items):
139139
for page in range(total_pages - 1):
140140
page_url = url % {
141141
'api_key': settings.FLICKR_API_KEY,
142-
'photoset_id': album.identifier,
142+
'user_id': self.user_id,
143143
'page': page + 1
144144
}
145145

tests/test_flickr_provider.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,9 @@ def test_albums_can_load_their_photos():
3030
for album in albums:
3131
provider.load_photos(album=album)
3232

33-
for photo in album.photos:
34-
assert photo.title
35-
assert photo.url
36-
assert photo.thumbnail
37-
print photo.url
38-
print photo.thumbnail
39-
40-
41-
33+
for photo in album.photos:
34+
assert photo.title
35+
assert photo.url
36+
assert photo.thumbnail
4237

4338

0 commit comments

Comments
 (0)