The Flickr service API doesn’t seem to have the getfavorites() request implemented. Is there an good way to do this with WebExecute?

Code to get started with:

For a given user, say 7944912@N05, there are n pages for which one can manually extract images:

s = StartWebSession[];

WebExecute[s,
"OpenPage" ->
"https://www.flickr.com/photos/7944912@N05/favorites/page1/"]

Length@possibleimageurls

i = Import@
"https://live.staticflickr.com/4278/34611590423_5f44dc95d2_k.jpg";
{Thumbnail@i, ImageDimensions[i]}


But I don't know how to enumerate the highest resolution ones.

• Easier is probably to patch the ServiceConnect paclet to add the request. That on its own isn't too hard. Just find the paclet with PacletFind and figure out where they implement all their requests. – b3m2a1 Sep 12 at 4:58
• Open the paclet with PacletFind["ServiceConnect_Flickr"]["Location"]. There’ll be a Kernel folder. Inside that there should be like Flickr.m or something. That’s where all the API requests are implemented. – b3m2a1 Sep 20 at 21:29
• I wrote up a Q/A about how to work with service connect packets here a few years back – b3m2a1 Sep 20 at 21:29
• @b3m2a1 Thanks, but PacletFind["ServiceConnect_Flickr"] gives {}, is there a link to your tutorial? – M.R. Sep 20 at 21:35
• @b3m2a1 Would you be able to point me to your tutorial? – M.R. Sep 23 at 19:12

This is not a full answer

As @b3m2a1 suggested, I looked into the paclet and tried updating the functions:

p = PacletFind["Service*_*Fl*"]
p[[1]]["Location"]


Which looks like this:

Then I added this to Flickr.m:

 flickrdata["RawFaves"] := {
"URL"                -> "https://api.flickr.com/services/rest?method=flickr.favorites.getlist",
"HTTPSMethod"        -> "GET",
"accuracy","safe_search","content_type","machine_tags","machine_tag_mode",
"group_id","contacts","woe_id","place_id","media","has_geo","geo_context",
"extras","per_page","page","format","nojsoncallback","jsoncallback"},
"RequiredParameters"-> {},
"ReturnContentData" -> True,
"ResultsFunction"    -> flickrimport
}


Then I restarted the kernel, configure the connection again (which there was a way to save between restarts):

PacletUpdate[p[[1]]]
f = ServiceConnect["Flickr"]


and tried it out:

results =
f["RawFaves", "user_id" -> "97408942@N04", "per_page" -> "2",
"page" -> "1", "format" -> "json", "nojsoncallback" -> "1"]


Q: How do I get it to return the original sized images?