Convert Flickr YQL search into RSS feed with Yahoo Pipes

144 views Asked by At

So I need help. I used yahoo YQL to do a text search inside of Flickr and return results, but of course they don't have image or page links.

Using the YQL (if anyone knows how to add 'large' images only to the sequence that'd be bonus awesomeness):

select * from flickr.photos.search where text="anime" and api_key="$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" and safe_search="3" and media="photos" and sort="relevance"

I'm trying to create an RSS feed based off the search. the return is looks like this:

<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="10" yahoo:created="2015-04-04T03:26:45Z" yahoo:lang="en-US">
<diagnostics>
<publiclyCallable>true</publiclyCallable>
<url execution-start-time="1" execution-stop-time="297" execution-time="296"><![CDATA[https://api.flickr.com/services/rest/?method=flickr.photos.search&text=anime&safe_search=3&media=photos&sort=relevance&page=1&per_page=10]]></url>
<user-time>286</user-time>
<service-time>282</service-time>
<build-version>0.2.75</build-version>
</diagnostics>
<results>
<photo farm="4" id="2971752694" isfamily="0" isfriend="0" ispublic="1" owner="31639715@N02" secret="43fd782aa4" server="3224" title="Anime_girl"/>
</results>
</query>
<!--  total: 286  -->
<!--  pprd1-node1005-lh2.manhattan.gq1.yahoo.com  -->

I know if I used PHP I could generate page and image links by doing something like:

<a href="https://www.flickr.com/photos/{$owner}/{$id}">
<img src="https://farm{$farm}.static.flickr.com/{$server}/{$id}_{$secret}.jpg" alt="{$title}" />
</a>

So I'm trying to use Yahoo pipes to pass the information into the RSS handler, but I can't figure out how combine the item codes into links and media via pipes. I used the sub-element to extract just the photos with 'item.results.photo' and the return is:

Anime_girl
farm 4
id 2971752694
isfamily 0
isfriend 0
ispublic 1
owner 31639715@N02
secret 43fd782aa4
server 3224
title Anime_girl

Is there a way to build the links and images in pipes? I was thinking something like https://www.flickr.com/photos/{item.owner}/{item.id}/ or https://www.flickr.com/photos/item.owner/item.id/ but they didn't work.

Or alternatively is there a way to pass the search query into the flickr.photos.getInfo and return the data for each photo?

Any help is appreciated, thank you.

P.S. If it's not possible I'll give up I guess. I thought maybe using the regex pipe and a loop, but I am horrid at understanding regex :(.

0

There are 0 answers