[flickr] relax unit test results
Images are now randomly served from the 'live.staticflickr.com' domain instead of the "old" 'farmN.staticflickr.com' one, making it impossible to use static 'url' and 'keyword' hashes as results. Image quality doesn't appear to be effected by which image-server is used. Files from 'farmN' and 'live' are the same.
This commit is contained in:
parent
bc2020e86c
commit
ec88ff1562
@ -1,5 +1,7 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
## 1.8.1 - 2019-03-29
|
## 1.8.1 - 2019-03-29
|
||||||
### Added
|
### Added
|
||||||
- Support for:
|
- Support for:
|
||||||
|
@ -51,16 +51,28 @@ class FlickrImageExtractor(FlickrExtractor):
|
|||||||
r"|flic\.kr/p/([A-Za-z1-9]+))")
|
r"|flic\.kr/p/([A-Za-z1-9]+))")
|
||||||
test = (
|
test = (
|
||||||
("https://www.flickr.com/photos/departingyyz/16089302239", {
|
("https://www.flickr.com/photos/departingyyz/16089302239", {
|
||||||
"url": "7f0887f5953f61c8b79a695cb102ea309c0346b0",
|
"pattern": pattern,
|
||||||
"keyword": "9ab391f989e50a9e3679303f1e2111d84dce3d2e",
|
|
||||||
"content": "6aaad7512d335ca93286fe2046e7fe3bb93d808e",
|
"content": "6aaad7512d335ca93286fe2046e7fe3bb93d808e",
|
||||||
|
"keyword": {
|
||||||
|
"extension": "jpg",
|
||||||
|
"filename": "16089302239_de18cd8017_b",
|
||||||
|
"id": "16089302239",
|
||||||
|
"photo": {
|
||||||
|
"height": "683",
|
||||||
|
"label": "Large",
|
||||||
|
"media": "photo",
|
||||||
|
"source": str,
|
||||||
|
"url": str,
|
||||||
|
"width": "1024"
|
||||||
|
},
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
("http://c2.staticflickr.com/2/1475/24531000464_9a7503ae68_b.jpg", {
|
("http://c2.staticflickr.com/2/1475/24531000464_9a7503ae68_b.jpg", {
|
||||||
"url": "40f5163488522ca5d918750ed7bd7fcf437982fe"}),
|
"pattern": pattern}),
|
||||||
("https://farm2.static.flickr.com/1035/1188352415_cb139831d0.jpg", {
|
("https://farm2.static.flickr.com/1035/1188352415_cb139831d0.jpg", {
|
||||||
"url": "ef217b4fdcb148a0cc9eae44b9342d4a65f6d697"}),
|
"pattern": pattern}),
|
||||||
("https://flic.kr/p/FPVo9U", {
|
("https://flic.kr/p/FPVo9U", {
|
||||||
"url": "92c54a00f31040c349cb2abcb1b9abe30cc508ae"}),
|
"pattern": pattern}),
|
||||||
("https://www.flickr.com/photos/zzz/16089302238", {
|
("https://www.flickr.com/photos/zzz/16089302238", {
|
||||||
"exception": exception.NotFoundError}),
|
"exception": exception.NotFoundError}),
|
||||||
)
|
)
|
||||||
@ -114,12 +126,12 @@ class FlickrAlbumExtractor(FlickrExtractor):
|
|||||||
r"photos/([^/]+)/(?:album|set)s(?:/(\d+))?")
|
r"photos/([^/]+)/(?:album|set)s(?:/(\d+))?")
|
||||||
test = (
|
test = (
|
||||||
(("https://www.flickr.com/photos/shona_s/albums/72157633471741607"), {
|
(("https://www.flickr.com/photos/shona_s/albums/72157633471741607"), {
|
||||||
"url": "baf4a3d1b15afcecf9638000a12c0eb3d5df9024",
|
"pattern": FlickrImageExtractor.pattern,
|
||||||
"keyword": "67ada37649e1219a414838027c3ee187119dcb33",
|
"count": 6,
|
||||||
}),
|
}),
|
||||||
("https://www.flickr.com/photos/shona_s/albums", {
|
("https://www.flickr.com/photos/shona_s/albums", {
|
||||||
"url": "657d541470482e0d69deec33ab97a6d7d4af6fe4",
|
"pattern": pattern,
|
||||||
"keyword": "736a41a7d702f7fe00edc957ae201d84f745e654",
|
"count": 2,
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -164,8 +176,8 @@ class FlickrGalleryExtractor(FlickrExtractor):
|
|||||||
r"photos/([^/]+)/galleries/(\d+)")
|
r"photos/([^/]+)/galleries/(\d+)")
|
||||||
test = (("https://www.flickr.com/photos/flickr/"
|
test = (("https://www.flickr.com/photos/flickr/"
|
||||||
"galleries/72157681572514792/"), {
|
"galleries/72157681572514792/"), {
|
||||||
"url": "1d012592bc7ce3a24b2b025b1176a31e947122f6",
|
"pattern": FlickrImageExtractor.pattern,
|
||||||
"keyword": "6abe4920dca5b79127fee16d90564665d379bb29",
|
"count": 12,
|
||||||
})
|
})
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
@ -192,6 +204,7 @@ class FlickrGroupExtractor(FlickrExtractor):
|
|||||||
pattern = r"(?:https?://)?(?:www\.)?flickr\.com/groups/([^/]+)"
|
pattern = r"(?:https?://)?(?:www\.)?flickr\.com/groups/([^/]+)"
|
||||||
test = ("https://www.flickr.com/groups/bird_headshots/", {
|
test = ("https://www.flickr.com/groups/bird_headshots/", {
|
||||||
"pattern": FlickrImageExtractor.pattern,
|
"pattern": FlickrImageExtractor.pattern,
|
||||||
|
"count": "> 150",
|
||||||
})
|
})
|
||||||
|
|
||||||
def data(self):
|
def data(self):
|
||||||
@ -209,8 +222,8 @@ class FlickrUserExtractor(FlickrExtractor):
|
|||||||
archive_fmt = "u_{user[nsid]}_{id}"
|
archive_fmt = "u_{user[nsid]}_{id}"
|
||||||
pattern = r"(?:https?://)?(?:www\.)?flickr\.com/photos/([^/]+)/?$"
|
pattern = r"(?:https?://)?(?:www\.)?flickr\.com/photos/([^/]+)/?$"
|
||||||
test = ("https://www.flickr.com/photos/shona_s/", {
|
test = ("https://www.flickr.com/photos/shona_s/", {
|
||||||
"url": "d125b536cd8c4229363276b6c84579c394eec3a2",
|
"pattern": FlickrImageExtractor.pattern,
|
||||||
"keyword": "3ef7783add7a34db1cf214da7d6502d3f24e897d",
|
"count": 28,
|
||||||
})
|
})
|
||||||
|
|
||||||
def photos(self):
|
def photos(self):
|
||||||
@ -224,8 +237,8 @@ class FlickrFavoriteExtractor(FlickrExtractor):
|
|||||||
archive_fmt = "f_{user[nsid]}_{id}"
|
archive_fmt = "f_{user[nsid]}_{id}"
|
||||||
pattern = r"(?:https?://)?(?:www\.)?flickr\.com/photos/([^/]+)/favorites"
|
pattern = r"(?:https?://)?(?:www\.)?flickr\.com/photos/([^/]+)/favorites"
|
||||||
test = ("https://www.flickr.com/photos/shona_s/favorites", {
|
test = ("https://www.flickr.com/photos/shona_s/favorites", {
|
||||||
"url": "5129b3f5bfa83cc25bdae3ce476036de1488dad2",
|
"pattern": FlickrImageExtractor.pattern,
|
||||||
"keyword": "ed56cda8c1067a44eb45f1df5f079a9a3a4470c6",
|
"count": 4,
|
||||||
})
|
})
|
||||||
|
|
||||||
def photos(self):
|
def photos(self):
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
# published by the Free Software Foundation.
|
# published by the Free Software Foundation.
|
||||||
|
|
||||||
__version__ = "1.8.1"
|
__version__ = "1.8.2-dev"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user