开发者

Basic help with creating a Pipe and how to isolate data

开发者 https://www.devze.com 2023-02-12 16:51 出处:网络
I\'m creating a pipe that basically needs to follow the work flow as follows: Read an XML feed from a website (already does it by fetch data)

I'm creating a pipe that basically needs to follow the work flow as follows:

  1. Read an XML feed from a website (already does it by fetch data)
  2. Grab some information of it (does it by using rename so a sub-element can be created with all the items)
  3. Off this information, I'll be extracting a URL which I'd like to run through the following YQL:

    use 'http://javarants.com/yql/javascript.xml' as j; select * from j where code='response.object = y.rest("http://www.my_url.com").followRedirects(false).get().headers.location;'

  4. I then want to take this URL, and update the URL already generated, s开发者_如何学运维o it can be returned by my pipe

I'm not sure I'm being very clear, but I'm having trouble with isolating things with Yahoo pipes. Basically I'd like to get a string returned by one of the items on my rename module, do some work with it (say run that URL through YQL), and then return it to update my output, so I have the newly created URL returned by my YQL

Also, I'd like to know how to modify this newly created URL returned by YQL is for example I wanted to change query string attributes of it.

Here's what my pipe looks like now:

Basic help with creating a Pipe and how to isolate data

Thanks in advance for any help.


To answer my own question, ended up looping through my attributes, and adding an item builder (for multiple items) inside of it.

I then emit the results, and the only XML I get back, is the one I need.

Simple and really functional as such:

Basic help with creating a Pipe and how to isolate data

0

精彩评论

暂无评论...
验证码 换一张
取 消