EscapistMagazine -> Zero Punctuation video list fix

Discussion in 'OnlineVideos' started by kmcc049, December 19, 2012.

  1. kmcc049

    kmcc049 Portal Member

    Joined:
    October 4, 2008
    Messages:
    7
    Likes Received:
    1
    Ratings:
    +1 / 0
    Zero punctuation started putting italics around the video titles which meant that most videos weren't showing in the list. The solution is to change the videolist regex to

    <div\sclass='filmstrip_video'><a\shref='(?<VideoUrl>[^']*)'><img\ssrc='(?<ImageUrl>[^']*)'></a><div\sclass='title'>[<i>]*(?<Title>[^<]*)[</i>]*</div><div\sclass='date'>Date:\s(?<Airdate>[^<]*)</div><div\sclass='comments'><a\shref='[^']*'>[^<]*</a></div></div>



    from

    <div\sclass='filmstrip_video'><a\shref='(?<VideoUrl>[^']*)'><img\ssrc='(?<ImageUrl>[^']*)'></a><div\sclass='title'>(?<Title>[^<]*)</div><div\sclass='date'>Date:\s(?<Airdate>[^<]*)</div><div\sclass='comments'><a\shref='[^']*'>[^<]*</a></div></div>

    of course if he starts bolding them it will break again so its not the most robust solution but it does work.
     
    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,805
    Likes Received:
    757
    Location:
    Nuenen
    Ratings:
    +1,124 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Thanks! Will fix and publish it tomorrow
     
  4. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,805
    Likes Received:
    757
    Location:
    Nuenen
    Ratings:
    +1,124 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Done!
     
  5. kmcc049

    kmcc049 Portal Member

    Joined:
    October 4, 2008
    Messages:
    7
    Likes Received:
    1
    Ratings:
    +1 / 0
    Thanks mate! working sweet now !
     
  6. kmcc049

    kmcc049 Portal Member

    Joined:
    October 4, 2008
    Messages:
    7
    Likes Received:
    1
    Ratings:
    +1 / 0
    Hi,

    Zero punctuation seems broken again. On the media portal UI I get no videos. Using the generic site creator app I am able to get a working video url, but only after I updated the config from the webservice, as the one checked into the SVN trunk appears to be out of date.

    I'm trying to work my own way through how things hang together but was just wondering about where the 'master' for onlinevideossites.xml lives as it seems you do check in changes to it quite regularly yet the webservice is able to serve out something different? It may be that this change just didn't get checked in?

    Anyway I'll have to check to make sure that my onlinevideos is properly updated on my MP box and check the onlinevideossites.xml also, as based on what I have been able to see I believe it should be in a working state.

    I also noticed that you have a LOL streams entry now, but this doesn't appear to be working for me either :(. I was thinking about taking a look at this later on tonight dependent on how long it takes me to figure out the problem with zero punctuation. From a quick look it looks like its taking the own3d streams and justin.tv streams. With season 3 starting up it would be cool to get the streams of the matches from lolesports.com (which I believe is backed by youtube and twitch). The VOD's would be great too. What is the story with making any changes to these classes? And what is your normal development process around testing and debugging as a cursory look didn't show up any test projects?
     
  7. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,805
    Likes Received:
    757
    Location:
    Nuenen
    Ratings:
    +1,124 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    That's quite a story.

    I'll try to answer some of the questions:

    The master onlinevideosites.xml is on offbyone's server, that is the one everybody gets the updates from.
    The one in svn should (imo) be a subset of what is in the master xml (not everybody contributing has svn write-access), and that's most of the time true.
    However, I'm not always consequent in updating the svn (I do for non-generic sites, but generally not for generic sites). The thing is, Escapist started as a non-generic one, and over time, I converted it to a generic one and forgot to delete the entry in onlinevideos. *shame*

    And on software updates: normally it's the responsability of the site-owner (me in this case) to do the updates in svn (this can be based ofcourse on user-input) and republish the site.

    And no, we don't have an official test/debug-tool. I guess it's more or less every developers own choice as how to do those.

    So concluding (guessing you don't have write access to svn), if you have any improvements I'll be happy to incorporate/publish them, but if you think it's too difficult to get it right, I'll check/fix things for you
     
  8. kmcc049

    kmcc049 Portal Member

    Joined:
    October 4, 2008
    Messages:
    7
    Likes Received:
    1
    Ratings:
    +1 / 0
    Hmm escapist is working now. It auto updated before I tried it though. I think what may have happened is that the new version pushed the old xml from svn over the top of the working xml and then the next time it auto updated it fixed it?

    I have a fixed regex for the lol streams video list.

    <tr.*?style="cursor.*?pointer;".*?onclick="view_stream\('(?<VideoUrl>[^']*)','[^,]*,'(?<hoster>[^']*)'\);".*?onMouseOver="show_preview\('[^']*',(?<ImageUrl>[^,]*),[^,]*,'[^']*','(?<Description>[^']*)'\);"[^>]*>\s<a\shref="[^"]*"\sstyle="display:none;">[^<]*</a>\s<td\sclass="live-td"><img[^>]*></td>\s<td\sclass="stream-name-td">(?<Title>[^<]*)<div[^>]*></div></td>\s<td\sclass="current-viewers-td"><font\scolor="green">(?<viewers>[^<]*)</font></td>\s<td\sclass="region-td"><img\ssrc="[^"]*"\stitle="(?<country>[^"]*)"\salt="[^"]*".*?/></td>\s</tr>
     
  9. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,805
    Likes Received:
    757
    Location:
    Nuenen
    Ratings:
    +1,124 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Removed escapist from svn, so no more confusion!

    And I updated the league of legends (only tested justin streams...)
    In the end, I didn't use your regex, because I always try to avoid things like .*?, because if no good match can be found, the latter part matches the next video, and that can give some strange results.
     
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!