UK IMDb Scraper (1 Viewer)

Dodgy Bob

MP Donator
  • Premium Supporter
  • July 10, 2008
    117
    3
    Home Country
    Wales Wales
    I have got it as "top priority" :)

    I've also done the old "re-read internet info." thing and specifically chosen this one. But I'll try disabling the others anyway.

    Cheers.

    Hmmm. Can't remember exactly what I did now but i got an error while in the Data Source dialog box, and now the UK source doesn't show in the list. But when I try and add it, it says it already exists.

    Found out what I did! :)

    If you select a source and then pressing the up arrow to move it's priority to the top too many times (i.e. "above" the top) causes the error.

    I know this is an error with MovingPictures and not with this script but it's preventing me testing this script now :(
     

    Dodgy Bob

    MP Donator
  • Premium Supporter
  • July 10, 2008
    117
    3
    Home Country
    Wales Wales
    Righto. I've found the new official scraper from the MovingPictures issue tracker.

    All I've done is changed the certification reg. exp. line, the name and modified the ID (no idea how this will affect the other scrapers). I've tested it and it seems to work fine.

    I hope the original authors don't mind the change and obviously use at your own risk, etc. I think it's being re-versioned to 2.0.0 now.
     

    Attachments

    • IMDB(UK) v1.6.1.xml
      15.7 KB

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    I certainly don't mind. I didn't realise there had been a version bump until now :)

    I posted it on the forum last week :)

    https://forum.team-mediaportal.com/moving-pictures-284/imdb-scraper-new-layout-need-testers-86960/

    Just needed testers first, as new layout hasn't been visible to a lot of users. It's still mainly in the labs of IMDb, but they are deploying it to small regions, such as Australia. I guess IMDb wants to make sure it works first.

    And it will be revisioned to v2.0.0 due to the massive amount of changes made. While adding the changes to support the new layout, I simply decided to convert all the XML expressions into CDATA so that they are much easier to edit in the future. In the end the file changed much more, hence the reversioning.

    It will get bundled with next update, so you can just wait for that.
     

    Dodgy Bob

    MP Donator
  • Premium Supporter
  • July 10, 2008
    117
    3
    Home Country
    Wales Wales
    RoChess : Sorry, I hadn't seen your post. For the record though, I spent most of yesterday rescanning loads of films using my modified version of 1.6.1 and it worked fine (for UK certs). Where a UK certification didn't exist (e.g. Defendor) it picked up the US one.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Where a UK certification didn't exist (e.g. Defendor) it picked up the US one.

    Since you can build filters based on certification results, it is usually preferred to have consistent results. So to prevent mixing UK and US certs, you could modify the scraper to make a replacement call based on US cert. It won't be pretty (certification usually isn't a direct conversion), but it's a rare case anyway when UK certs are not present and it's usually close enough.

    You get code such as:

    Code:
          <!-- If UK certification failed, use converted US one -->
          <if test="${movie.certification}=">
                <parse name="certification_usa" input="${details_page}" regex="${rx_certification_usa}" />
                <!-- Fix localized rating, forced to swap order, as 'G' gets replaced inside 'PG' and 'PG-13' otherwise -->
                <replace name='certification1' input='${certification_usa[0][0]:htmldecode}' pattern='X' with='R18'/>
                <replace name='certification2' input='${certification1}' pattern='NC-17' with='18'/>
                <replace name='certification3' input='${certification2}' pattern='R' with='15'/>
                <replace name='certification4' input='${certification3}' pattern='PG-13' with='12'/>
                <replace name='certification5' input='${certification4}' pattern='PG' with='PG'/>
                <replace name='certification6' input='${certification5}' pattern='G' with='U'/>
                <set name='movie.certification' value='${certification6}'/>
          </if>

    You place this after you first try to obtain the UK certification, and be sure to add the CDATA expression, which i renamed to '_usa' postfix.

    Enjoy.
     

    youngie10

    Portal Member
    November 19, 2010
    7
    1
    Home Country
    England England
    Hey thanks alot for the uk scraper, i'm using the 2.0.2 version and i'm having a problem, every time i add it as a source in the moving pictures config it works fine first but then when i add films afterwards it doesn't use the new uk one and all the info is not there, i think it's using themoviedb.org cos i go into config and the uk imdb scraper is not there i have to keep adding it and rescanning my films. Anyone else having this problem or know how to solve it? Thank you very much in advance.

    edit:here's a copy of the log, i get this error at the end "Priority and List.IndexOf out of sync... " i don't understand a word of it :sorry: wonder if that has anything to do with it?
     

    Mew

    Portal Pro
    January 11, 2007
    356
    111
    53
    Hertfordshire
    Home Country
    England England
    Hi youngie10

    I have noticed a similar issue in the current version of Moving Pictures (1.0.8) that it does not seem to save the importer in the list.
    I think if you close the Moving Pictures configuration and then go back in it is still there but if you close MediaPortal configuration and then try to go back in, it is gone and the grabber defaults to a different importer. You can add the importer again and it works (so does not complain about duplicate IDs) for that session.

    Mew
     

    Users who are viewing this thread

    Top Bottom