Gametrailers - support thread (1 Viewer)

offbyone

Development Group
  • Team MediaPortal
  • April 26, 2008
    3,981
    3,703
    Stuttgart
    Germany Germany
    Country flag
    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.
     

    sleepydog

    Portal Member
    October 20, 2011
    6
    1

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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:
    <Site name="GT 2.0" util="GenericSite" agecheck="false" enabled="true" lang="English">
      <Description>-</Description>
      <Configuration>
        <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>
        <item key="videoListUrlDecoding"><![CDATA[HtmlDecode]]></item>
        <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>
        <item key="nextPageRegExUrlDecoding"><![CDATA[HtmlDecode]]></item>
        <item key="playlistUrlRegEx"><![CDATA[\s*data-contentId='(?<url>[^']*)'*.*data-token="(?<token>[^"]*)"]]></item>
        <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>
        <item key="baseUrl"><![CDATA[[URL][URL][URL][URL][URL][URL]http://www.gametrailers.com[/URL][/URL][/URL][/URL][/URL][/URL]]]></item>
        <item key="videoThumbFormatString"><![CDATA[<meta\sitemprop="thumbnail"\scontent="(?<ImageUrl>[^"]*)"/>]]></item>
      </Configuration>
      <Categories>
        <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>
      </Categories>
    </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:

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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:

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,981
    3,703
    Stuttgart
    Germany Germany
    Country flag
    Thanks a lot for your help! I committed your changes to SVN and updated the site now.
     

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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:

    SiLenTYL

    Retired Team Member
  • Premium Supporter
  • April 23, 2004
    1,144
    159
    Melbourne
    Australia Australia
    Country flag
    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
     

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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:

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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:

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    Added new console categories and E3 2013 to "ALL" category for the time being.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    CyberSimian Support for control.isvisible() in expressions MediaPortal 1 8
    morpheus_xx [WiP] OnlineVideos: New browser based playback support using WebDriver, new Amazon siteutil MediaPortal 2 6
    M 2nd (Touch-)Display Support on MediaPortal 2 such MPDisplay++? General 2
    J Support waipu TV TV-Server 0
    doskabouter WebDAV support OnlineVideos 0
    K Multichannel audio and subtitles for TV not properly supported General Support 4
    CyberSimian Support pack for Ortek VRC-1100 and Hama 00052451 Remotes 6
    cbr954rr [Finished] [MP2-801] Support for tag image extraction Archive 7
    catavolt [solved] FanartHandler - Skin - Holiday and Spotlight support Fanart Handler 9
    C Drive Type is not supported by system Allgemeines Support- und Diskussionsforum 3
    raffe [solved] Export tool and import support from MP-TVSeries & Moving Pictures to MP2 General 22
    morpheus_xx General Testing TVE 3.5 Sat>IP support (MP2 only) TV Engine 47
    E M3U Playlist and EPG Support/Configuration Installation, configuration support 1
    G Mediaportal2 supported formats General 1
    M [solved] Stub Support General 11
    morpheus_xx [WiP] Adding 64 bit support to MP2 MediaPortal 2 15
    A Mediaportal 1.20 support MediaPortal 1 Talk 3
    Lehmden FTP and WebDAV support. MediaPortal 2 0
    ajs [Action Required] MP 1.25 Final Release thread MediaPortal 1 503
    ajs [Action Required] MP 1.26 Pre Release thread MediaPortal 1 132
    ajs [Action Required] MP 1.25 Pre Release thread MediaPortal 1 515
    ajs [Action Required] MP 1.24 Final Release thread MediaPortal 1 37
    azzuro [Action Required] MP 1.24 Pre Release thread MediaPortal 1 207
    azzuro [Action Required] MP 1.23 Final Release thread MediaPortal 1 58
    ge2301 Discussion Thread Nereus 11
    Similar threads

























    Top Bottom