Gametrailers - support thread | Page 2

Discussion in 'OnlineVideos' started by Rick164, June 12, 2011.

  1. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    AW: Gametrailers - new and improved version

    I already have a version scheduled for the next OV release that will let you chose SD or HD when available.


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. sleepydog

    sleepydog Portal Member

    Joined:
    October 20, 2011
    Messages:
    6
    Likes Received:
    1
    Ratings:
    +1 / 0
  4. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Currently working on a new version since Gametrailers 2.0 launched and messed everything up, hoping to have it done in a few days tops.

    /Edit:

    My draft so far is listed below, know how to get it working but stuck at the PlaylistUrlRegexp step because Online Videos doesn't seem to allow more then 1 named regex group in the PlaylistUrl step.

    For Gametrailers I need to retrieve 2 strings from the html source (token / video_id) and got both matched but can't parse them for the next step (FileUrl) :(
    Anyone know of a solution for this besides making a custom util?

    HTML:
    1. <Site name="GT 2.0" util="GenericSite" agecheck="false" enabled="true" lang="English">
    2.   <Description>-</Description>
    3.   <Configuration>
    4.     <item key="videoListRegEx"><![CDATA[<meta\sitemprop="url"\scontent="(?<VideoUrl>[^"]*)"/>\s*<meta\sitemprop="name"\scontent="(?<Title>[^"]*)"/>\s*<meta\sitemprop="thumbnail"\scontent="(?<ImageUrl>[^"]*)"/>\s*<meta\sitemprop="description"\scontent="(?<Description>[^"]*)"/>\s*<meta\sitemprop="uploadDate"\scontent="(?<Airdate>[^"]*)"/>\s*<meta\sitemprop="duration"\scontent="(?<Duration>[^"]*)"/>]]></item>
    5.     <item key="videoListUrlDecoding"><![CDATA[HtmlDecode]]></item>
    6.     <item key="nextPageRegEx"><![CDATA[<li\sclass="next"><a\sclass="override_nav_background_color\soverride_nav_text_color"\srel="next"\shref="(?<url>[^"]*)">&rarr;</a></li></ul></div>]]></item>
    7.     <item key="nextPageRegExUrlDecoding"><![CDATA[HtmlDecode]]></item>
    8.     <item key="playlistUrlRegEx"><![CDATA[\s*data-contentId='(?<url>[^']*)'*.*data-token="(?<token>[^"]*)"]]></item>
    9.     <item key="playlistUrlFormatString"><![CDATA[[URL][URL][URL][URL][URL][URL]http://www.gametrailers.com/feeds/video_download/[/URL][/URL][/URL][/URL][/URL][/URL]{0}/{1}]]></item>
    10.     <item key="baseUrl"><![CDATA[[URL][URL][URL][URL][URL][URL]http://www.gametrailers.com[/URL][/URL][/URL][/URL][/URL][/URL]]]></item>
    11.     <item key="videoThumbFormatString"><![CDATA[<meta\sitemprop="thumbnail"\scontent="(?<ImageUrl>[^"]*)"/>]]></item>
    12.   </Configuration>
    13.   <Categories>
    14.     <Category xsi:type="RssLink" name="Xbox">[URL][URL][URL][URL][URL][URL]http://www.gametrailers.com/xbox-360/videos-trailers[/URL][/URL][/URL][/URL][/URL][/URL]</Category>
    15.   </Categories>
    16. </Site>
    /Edit 2:

    See that OffByOne has already made a siteutil for this one, will update it with the new regex and search code if he doesn't mind :)
     
    Last edited: July 3, 2012
  5. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    New version send to Offbyone :) , still not perfect but it's a good base version.
    Things that aren't working yet:

    -Search
    No way to directly link the category trailers/videos (javascript calls) so only game results are given, did add it so someone else might get it fixed.

    - Subcategories
    Javascripts calls are made to switch Categories now, couldn't find any direct links to these.

    - SD/HD support
    Using the download button for the direct link and can't find out how to parse it along so it reverts to HD.

    For the rest it's all good though :D , was a little tricky to get working since they don't even support RSS anymore but oh well it might get better once they have ironed out all the bugs.
     
    Last edited: July 3, 2012
    • Like Like x 1
  6. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    Thanks a lot for your help! I committed your changes to SVN and updated the site now.
     
  7. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Your welcome :) , happy to help out when I can.
    Almost done with Subcategories support as well, will post it when it's completed (hopefully today :p )

    /Edit: New version completed and send the new link, changelog:

    - Added Dynamic SubCategory support (all subcategories on the site are now supported)
    - Bugfix for description text (added htmldecode for special characters).
    - Changed NextPage function and Regexp.
    - Code cleanup

    Also found a way to get the search working but requires some more testing, so maybe in a few days or so.

    /Edit 2: Was quicker then I thought but search function is now fully working and send new link to Offbyone
     
    Last edited: July 4, 2012
  8. SiLenTYL
    • Team MediaPortal

    SiLenTYL Retired Team Member

    Joined:
    April 23, 2004
    Messages:
    1,144
    Likes Received:
    144
    Gender:
    Male
    Location:
    Melbourne
    Ratings:
    +153 / 0
    Home Country:
    Australia Australia
    hi.. just tried the updated gametrailers in online videos plugin and i see categories and thumbnails even.. but it says url not found when i try playing any video
     
  9. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Best to wait for when the newer version is online, it might be fixed already but if not please let me know.

    /edit: Offbyone transferred maintainer rights for Gametrailers.com to me, so I will be publishing updates for this site from now on.
    The new update is live so please let me know if there are still any issues :)

    PS: If it breaks at some point due to site change for instance then PM me and it will get fixed.
     
    Last edited: July 5, 2012
  10. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Some regional settings were adding quotations around the video_url (my en-US workmachine had no troubles) and broke playback, this has now been resolved and after updating it will work correctly in all cases.

    /Edit: The Gametrailers devs thought it would be funny to rename the <A> tag link with the VideoURL to "Thumbnail" (which is of course wrong ;) )
    New XML published and playback is working again.
     
    Last edited: July 12, 2012
  11. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!