Quick Scraper Node Question (1 Viewer)

Schenk2302

Portal Pro
September 12, 2008
50
14
Bonn
Home Country
Germany Germany
Hello,

how and is it possible to tell the scraper if first retrieve/parse page gives no resut than use the second one. Same vice versa means if first gives a result don't use the second one?

I hope you understand...

Thanks

Schenk
 

fforde

Community Plugin Dev
June 7, 2007
2,666
1,699
40
Texas
Home Country
United States of America United States of America
Sorry, don't understand, can you elaborate maybe using the site you're scripting as an example?
 

Schenk2302

Portal Pro
September 12, 2008
50
14
Bonn
Home Country
Germany Germany
Okay i´ll try:

Code:
    <retrieve name="links_page_com" url="http://www.cinefacts.de/kino/film/${movie.site_id}/${movie.title}/externe_links.html"/>
     <parse name="imdb_com" input="${links_page_com}" regex="${rx_imdb_com}"/>
      <if test="${imdb_com[0][0]!=">
       <set name="movie.imdb_id" value="${imdb_com[0][0]}"/>
      </if>

Code:
    <retrieve name="links_page_de" url="http://www.cinefacts.de/kino/film/${movie.site_id}/${movie.title}/externe_links.html"/>
     <parse name="imdb_de" input="${links_page_de}" regex="${rx_imdb_de}"/>
      <if test="${imdb_de[0][0]!=">
       <set name="movie.imdb_id" value="${imdb_de[0][0]}"/>

If the result is found in the first try then set name, if no result is found, try second one and if found set name .

Hope this makes sens to you now :)

Thanks

Schenk

Sorry i forgot an e
 

fforde

Community Plugin Dev
June 7, 2007
2,666
1,699
40
Texas
Home Country
United States of America United States of America
Just wrap the bottom section in an <if> node like this:

Code:
<if test="${imdb_com[0][0]=">
</if>
 

Users who are viewing this thread

Similar threads

I think MPExtended need rework for support this - andrewjswan/MPExtended Maybe better direct select to TV SQL DB? Or look how MPExtended get this info ...
I think MPExtended need rework for support this - andrewjswan/MPExtended Maybe better direct select to TV SQL DB? Or look how...
Hi everyone, I am hoping someone can help with the following. I am based in the UK. I have a family member who has a disability...
Replies
7
Views
684
Small skin graphics cached ... big not always ... While you in window al changes for windows skin ignored, when you reenter to this windowm its load skin again with all changes ... :)
Small skin graphics cached ... big not always ... While you in window al changes for windows skin ignored, when you reenter to...
Hi Guys, I just recently completed a major cleanup and reorganization of my media library. My media library is stored on a 10 TB...
Replies
13
Views
921
Hello!!! I use a handy app called catchin' sync to roughly check the AV sync of audio/video on my HTPC/TV. It's not as accurate as a dedicated opto-electronic calibrator but it's more than adequate for this application and much better than trying to do things by eye (even when the lack of sync is massively obvious, subjective...
Hello!!! I use a handy app called catchin' sync to roughly check the AV sync of audio/video on my HTPC/TV. It's not as accurate as...
Hello!!! I use a handy app called catchin' sync to roughly check the AV sync of audio/video on my HTPC/TV. It's not as accurate as...
Replies
0
Views
394
Hello Mediaportal-Forum, I have a problem with my technotrend S2-3200 cards. After a while the card loses all signal information. The first one work for years without problems. Suddenly mediaportal didn't show a program, no signal. All my efforts to find signal by rebooting, rescanning of channels or reinstalling driver toke no...
Hello Mediaportal-Forum, I have a problem with my technotrend S2-3200 cards. After a while the card loses all signal information...
Hello Mediaportal-Forum, I have a problem with my technotrend S2-3200 cards. After a while the card loses all signal information...
Replies
0
Views
501
Would have been cool, but no. For this, and a few other reasons, I moved on to Channels DVR. More or less the same idea though, as I'm using Channels as a backend for Plex with xTeVe as a virtual tuner. I've lost touch somewhat with what's going on with MePo, but Channels is being very actively developed (which is key, as there's a...
Would have been cool, but no. For this, and a few other reasons, I moved on to Channels DVR. More or less the same idea though...
Love MediaPortal 1! I've been using it for years, originally with the MePo client and for the last few years as a backend for...
Replies
6
Views
2K
Top Bottom