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
45
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
    921
    I am following the official documentation for setting up the Kodi plugin in media portal. I have got no issues with media portal, nor media portal plugin on Kodi, but with the Kodi plugin that must be installed in the media portal, as it is not getting detected. I have made a copy of the dll file into the plugins folder as found in my...
    I am following the official documentation for setting up the Kodi plugin in media portal. I have got no issues with media portal...
    I am following the official documentation for setting up the Kodi plugin in media portal. I have got no issues with media portal...
    Replies
    0
    Views
    245
    Thank you for confirming that U&W works for you. I ended up deleting U&W and rescanning for channels. That fixed the issue.
    Thank you for confirming that U&W works for you. I ended up deleting U&W and rescanning for channels. That fixed the issue.
    I have setup Refresh DVB EPG so that BBC One is the grabber channel (which is meant to grab all available channels) but the U&W...
    Replies
    2
    Views
    460
    It may seem strange, but the open-source license allows anyone to sell physical CDs or DVDs to customers, provided that, for example, the source code is made available upon request and additional value is provided, such as an installation manual. Both of these are mentioned in the product description, so it appears to be legitimate...
    It may seem strange, but the open-source license allows anyone to sell physical CDs or DVDs to customers, provided that, for...
    I just recently started using your software and I noticed on eBay one person is selling it for about $16.00. You can make a claim...
    Replies
    2
    Views
    288
    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
    Top Bottom