Quantcast
Channel: configuration - Forum - FlexGet
Viewing all articles
Browse latest Browse all 716

Select only first of multiple alternative links

$
0
0

@avalloneandrea wrote:

I'm trying to create a task which extracts all the ad.fly links out of a web page (and produce a crawljob for JDownloader).
This is what I was able to achieve so far:

tasks:
  Berserk:
    html:
      url: http://redanimedatabase.forumcommunity.net/?t=59599528
      links_re: [adf.ly,shrink]
    accept_all:
      yes
    exec:
      - echo text={{url}} >> /media/flash/jdownloader/{{title}}.crawljob
      - echo downloadFolder=/media/flash/berserk/ >> /media/flash/jdownloader/{{title}}.crawljob
      - echo autoConfirm=true >> /media/flash/jdownloader/{{title}}.crawljob

However, the above web page shows four alternative links for each episode (download 1, download 2, streaming 1, streaming 2), and I need only the first of them.
How can I create such a filter?

EDIT: also, I had to wrote three times the /media/flash/jdownloader/{{title}}.crawljob part. Is there a way to assign that string to a constant and let flexget do the replacements?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 716

Trending Articles