Backdrop scraper (1 Viewer)

piernik

Portal Pro
October 22, 2008
141
26
Could anyone attach here working backdrop scrapper? I have no documentation and no example. Without them making good scraper is rather hard :/
 

fforde

Community Plugin Dev
June 7, 2007
2,667
1,702
44
Texas
Home Country
United States of America United States of America

piernik

Portal Pro
October 22, 2008
141
26
On wiki page I can't find nothing about backdrops:/
"Purpose of script types. Backdrop scripts not yet implemented."
"Backdrop scraper (needs information)"

But if You could help...
I'm downloading backdrop from site where there is often 50+ photos... How to break loop?

Code:
<parse name="check2" input="${photo_page}" regex="${rx_backdrop_item}" />
  <if test='${check2[0][0]}!='>
    <parse name="backdrops_items" input="${photo_page}" regex="${rx_backdrop_item}" />
      <loop name="backdrop_item" on="backdrops_items">
        <set name='backdrop[${count}].url' value='${backdrop_item[0]}' />
      </loop>     
    </if>
 

piernik

Portal Pro
October 22, 2008
141
26
One more thing...
I have two sources of covers. First is one file for main cover which \is the most acuratte. Next are for ex. from other countries.
But those next always overwite the main one. How to fix it?
Here is code:

Code:
<if test='${movie.site_id}!='>
			<retrieve name="film_page" url="http://www.filmweb.pl${movie.site_id}" allow_unsafe_header="true"  cookies="welcomeScreenNew=welcomeScreen"/>
			
			<parse name="main_cover" input="${film_page}" regex="${rx_main_cover}" />
			<replace name='main_cover[0][0]' input='${main_cover[0][0]}' pattern='\.1\.' with='.3.' />
			<set name='cover_art[0].url' value='${main_cover[0][0]}' />
			
			<retrieve name="details_page" url="http://www.filmweb.pl${movie.site_id}/posters" allow_unsafe_header="true"  cookies="welcomeScreenNew=welcomeScreen"/>

			<!-- if ad page try again -->
			<parse name="check" input="${details_page}" regex="${rx_ad_check}" />
			<if test='${check[0][0]}!='>
				<retrieve name="details_page" url="http://www.filmweb.pl${movie.site_id}/posters" allow_unsafe_header="true"  cookies="welcomeScreenNew=welcomeScreen"/>
			</if>
			
			<parse name="cover_arts" input="${details_page}" regex="${rx_cover_art}" />
			<loop name="cover_art" on="cover_arts">
				<replace name='cover_art[0]' input='${cover_art[0]}' pattern='\.2\.' with='.3.' />
				<set name='cover_art[${count}].url' value='${cover_art[0]}'/>
			</loop>
		</if>
 

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    One more thing...
    I have two sources of covers. First is one file for main cover which \is the most acuratte. Next are for ex. from other countries.
    But those next always overwite the main one. How to fix it?
    Here is code:

    You are using 'cover_art[${count}].url', but you did not adjust the value on ${count} in your script, so it will start with value '0', which overwrites the original cover you set. You can also just add an 'if' check to see if the previous method resulted in a cover, that way you can skip the entire block to speed things up.
     

    piernik

    Portal Pro
    October 22, 2008
    141
    26
    It turns out that You can't define count value before loop (it has no effect)
    I did it this way

    Code:
    <parse name="cover_arts" input="${details_page}" regex="${rx_cover_art}" />
    			<loop name="cover_art" on="cover_arts">
    				<if test='${count}=0'>
    					<set name='count' value='1' />
    				</if>
    				<replace name='cover_art[0]' input='${cover_art[0]}' pattern='\.2\.' with='.3.' />
    				<set name='cover_art[${count}].url' value='${cover_art[0]}'/>
    			</loop>
     

    Users who are viewing this thread

    Similar threads

    I made some updates to the Wiki page describing the <import> and <include> tags, including adding a couple of new xml examples. For the first example, I highlighted the example text and eventually found the location in the menus where I could select the CODE macro to have the example text formatted as a code example. So far, so good...
    I made some updates to the Wiki page describing the <import> and <include> tags, including adding a couple of new xml examples. For...
    I made some updates to the Wiki page describing the <import> and <include> tags, including adding a couple of new xml examples. For...
    Replies
    0
    Views
    516
    Since you have to browse through the available background images anyway before you can choose your favorites, it would be nice to have an “artwork chooser” similar to the one in TVSeries! ;)
    Since you have to browse through the available background images anyway before you can choose your favorites, it would be nice to...
    What's the best way to select a different backdrop? Sometimes the first selected backdrop is not great and I'd like to select...
    Replies
    5
    Views
    2K
    Maybe [News] - MediaPortal 1.33 Pre-Release with new x64 version ready for testing
    Maybe [News] - MediaPortal 1.33 Pre-Release with new x64 version ready for testing
    After a long time I built a new HTPC. Everything went well. Just one problem. I imported the old recordings and can see them in the...
    Replies
    4
    Views
    419
    That one works fine.
    That one works fine.
    The "IMDB_MP117x.csscript" and "IMDB_MP113x.csscript" scrapers for videos is not getting any results anymore. Could someone please...
    Replies
    3
    Views
    1K
    I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select "Internal DirectShow player" as music output, but then you lose gapless playback. If you you don't have multichannel music you can choose WASAPI as the output and set the number of speakers to stereo. I have...
    I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select...
    Not sure if this a a bug/config/settings problem. I am running a media portal 2.5 server with 2.41 client but it seems I get the...
    Replies
    1
    Views
    647
    Top Bottom