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

    What's the best way to select a different backdrop? Sometimes the first selected backdrop is not great and I'd like to select another. Moving Pictures scales down the high res pictures and shrinks the filesize as well so I can't just go to fanart or themoviedb and get the images without doing some extra work to get the file right...
    What's the best way to select a different backdrop? Sometimes the first selected backdrop is not great and I'd like to select...
    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
    0
    Views
    1K
    Those folder's last modified time isn't really accurate it seems. Latest change was a merge from PR #384 on may 3rd which was exactly that fix, see f.e. MediaPortal-1/mediaportal/MediaPortal.Application/MediaPortal.cs at 8fa4ccca20059a5534a029266efa596e83387f5b · MediaPortal/MediaPortal-1
    Those folder's last modified time isn't really accurate it seems. Latest change was a merge from PR #384 on may 3rd which was...
    Now that MediaPortal has gone 64-bit, any references to lParam should be converted to int64 rather than int32 or compared to zero...
    Replies
    7
    Views
    915
    two simultaneous recordings succeeded. All good!
    two simultaneous recordings succeeded. All good!
    Since upgrading from 1.36 to 1.38, MP1 no longer connects to my tuners. They no longer appear under the server in the left-hand...
    Replies
    11
    Views
    1K
    Isn't there anyone who needs the series episode listings in the EPG? Perhaps someone could move this post to the English forum.
    Isn't there anyone who needs the series episode listings in the EPG? Perhaps someone could move this post to the English forum.
    Since EPG Buddy is no longer working and the 'TV Movie EPG Import ++' plugin is working again, I'm now having trouble completing...
    Replies
    1
    Views
    1K
    After Tv Movie EPG Import++ is unrepairable, I tried Tv Movie EPG Import. Unfortunately, the import gets stuck here. Does anyone have an idea why this could be, or does it still work for anyone at all?
    After Tv Movie EPG Import++ is unrepairable, I tried Tv Movie EPG Import. Unfortunately, the import gets stuck here. Does anyone...
    After Tv Movie EPG Import++ is unrepairable, I tried Tv Movie EPG Import. Unfortunately, the import gets stuck here. Does anyone...
    Replies
    0
    Views
    651
    Top Bottom