• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 17
I want a "My TV" section (with a separate database)
#46
i really hope this comes to fruition. i would love to see something added for tv episodes.

something i think that would be cool would be the ability to select a show and have a random episode played continuously. so i could select, for example, seinfeld and be able to have xbmc continuously play random episodes from that show alone. it would also be cool if you could select any file within a show and have xbmc autoplay the next file (in either "titles" or "file" view).
Reply
#47
i'll learn c just be able to help out with the tv section :p

i would like to vote to base the info lookup on tv.com than anyother since they have much more detail about every episode. if you look at tviv or anyother and look of the episode info from a episode older than the website (i took las vegas season 1 as an example) and the describtion is only a short sentence, the same episode on tv.com is 10x as long and has screenshots, video clips, score, trivia and more.
Reply
#48
u guys keep suggesting new scrapers.

well, here's a tool to implement those scrapers that will hopefully be used with xbmc later.

http://www.stud.ntnu.no/~arnemort/scrapers.zip

simply put, you develop the scrapers using regular expression, in xml.
currently only compiled it under linux but it should easily be portable (strcasestr and strcasecmp might have different names..)

key things to keep in mind:
a) the regexp's are evaluated in lifo order, that is, the innermost regexp is evaluated first.
b) input and output strings access the parser-level buffers with a prefix of $. the output strings access the regexp-level buffers in the normal way (e.g. \1)
c) dest parameters are simply a parser-level buffer, with no prefix. a + postfix means concat.
d) failed regexp's won't clear the dest-buffer unless you state it explicitly with the clear parameter.
e) use the compare parameter to compare the result of from a regexp with a buffer (i.e. to search).
f) use the repeat parameter to .. repeat the regexp Smile

to make sense of anything of this, you'd have to compare the imdb-scraper in imdb.xml to the source code of the current .dll based scraper (xbmc/tools/htmlscraper/htmlscraper.cpp)

btw: i'd love if somebody could put this into a test gui. won't bother with it myself, but it would make it a bit more userfriendly Smile

oh, one more thing. since we're using xml to parse html, and then output into xml again, we have to escape a lot of characters, such as < (<) > (>) " (") . it's a bit nasty, i'll admit. but, if you open the xml in a xml-enabled viewer (such as a webbrowser) you'll get it displayed mure humanly viewable..

please, oh please somebody pick this up =)

i'd love to see a tv.com scraper and a tviv scraper done using this
Reply
#49
i'm going to post here to see if we can bring this one back to life.

a "tv show episode guide" would be a fantastic addition to xbmc. these days with all the tv shows being posted on the internet and with iptv coming fast. imo this would be vastly used by the xbmc community.
I'm not an expert but I play one at work.
Reply
#50
well, until somebody does some scrapers for me, i won't bother.

when i know that i won't have to do them as well, i'll start working on this again.
Reply
#51
i made a link on the first screen called my tv, but still have to link it to some videos. is there a way that i can link it with some program that streams tv over the internet?
i\'m a lame spammer, and i\'m now banned. kthx bye
Reply
#52
(scoobaman @ feb. 28 2006,08:00 Wrote:i made a link on the first screen called my tv, but still have to link it to some videos. is there a way that i can link it with some program that streams tv over the internet?
your post is off topic. but the short answer is no.
I'm not an expert but I play one at work.
Reply
#53
(spiff @ feb. 28 2006,12:59 Wrote:well, until somebody does some scrapers for me, i won't bother.
when i know that i won't have to do them as well, i'll start working on this again.

spiff, does the scraper have to be written in c ?
i've taken a look at the structure of tv.com and concluded that a scraper for this site is quite the pain, so i don't blame you for not undergoing that project yourself :-) did the tv.com xml guy provide any eta for providing data through xml ?

one of the interesting (and mind boggling) things about tv.com is that only one field in the url seem to matter.

show summary: /*/show/<show id>/summary.html
episode guide: /*/show/<show id>/episode_guide.html
episode listings: /*/show/<show id>/episode_listings.html

24 show id: 3866
alias show id: 3451

examples:
24 show summary, when brought there by a search for 24
http://www.tv.com/24/show/3866/summary.html?q=24
.. and when navigating there through links
http://www.tv.com/24/show/3866/summary.html

you'd think that "24" in the url matters, but:

http://www.tv.com/xbmc%20rules/show/3866/summary.html
http://www.tv.com/schnarf-face/show/3866...tings.html

parsing this information is extremely arduous. as asinine as it may seem, the easiest would be to get the episode listings from epguides.com and navigate to tv.com from there for the episode summaries.

conceptual demonstration using lynx to get episode 7, season 2, of alias:

$ lynx -source http://www.epguides.com/alias | grep 2-\ 7
29. 2- 7 e658 17 nov 02 <a target="visit" href="[url]http://www.tv.com/alias/the-counteragent/episode/205045/summary.html">the[/url] counteragent</a>

epguides.com seems completely deterministic and the urls are case insensitive. picking a random show, prison break, to fetch the summary url of episode 4, season 1 (adding some more unix magic to demonstrate how easily available the url really is)

$ lynx -source http://www.epguides.com/prisonbreak/|grep 1-\ 4|awk -f\" '{print $4}'
http://www.tv.com/prison-break/cute-pois...mmary.html

this posting was intended differently when i started it, but hopefully some of this information was food for thought.

thanks to everyone involved with this great project. i for one would love to see tv show information, and from the length and duration of this thread i realize i'm not the only one ! :-)
Reply
#54
this perl script i just wrote might come in handy for some python scripters out there. it takes show title, season number and episode number as input, and outputs episode title and summary. it's quick & dirty but it gets the job done (at least on all the episodes i tested on (alias, 24, prison break, simpsons, west wing))

when (if ?) we get a my tv section, a similar script to this one could be called when requesting 'info' on a tv episode, using directory name as title and a regexp extracting season and episode from the filename...

example of current usage:

$ ./epguide.pl --title=simpsons --season=10 --episode=10
title: viva ned flanders
url: http://www.tv.com/simpsons/viva-ned-flan...mmary.html
summary:

springfield implodes its casino. when homer goes to the car wash, he sees that flanders is getting a senior citizens' discount. he calls flander's out in church and flander's confesses that he is 60-years-old, his youthful appearance is due to three c's, clean living, chewing thoroughly, a daily dose of vitamin church and resisting all major urges. homer accuses him of never living a day in his life. this makes him wish for more interesting experiences and since homer is the king of such experiences, homer offers to help flanders. flanders gives homer his power of attorney and homer takes him to las vegas. they go on a drunken binge at a casino, only to wake up with new wives. they run from their new wives and all the famous vegas personalities chase them down and kick them out of town. what story will they tell their real wives about where they have been? easy, they were abducted by aliens at wal-mart and gang-probed.



Quote:#!/usr/bin/perl

use strict;

use getopt::long;

my $debug = 0;
my %opt;

getoptions(\%opt, "title=s",
"season=i",
"episode=i",
);

my $title = $opt{title};
my $season = sprintf("%02d", $opt{season});
my $episode = sprintf("%02d", $opt{episode});
my $summary_url = "";
my $episode_title = "";
my $summary_string = "";

open data, "lynx -source [url=http://www.epguides.com/$title]http://www.epguides.com/$title[/url] |";

$episode=~s/^0/ /g; # replaces leading zero's with empty spaces to fit epguides format
$season=~s/^0/ /g;

print "/\d$season-$episode.*target=\"visit\" href=\"(http:\/\/www.tv.com\/[^\"]+)\">([^<]+)</\n" if $debug;

while (<data>) {
print if $debug;
if (/\d$season-$episode.*target="visit" href="(http:\/\/www.tv.com\/[^"]+)">([^<]+)</) {
$summary_url = $1;;
$episode_title = $2;
last;
}
}

close data;

if ($summary_url eq "") {
print "no info found !";
exit 1;
} else {
print " title: $episode_title\n";
print " url: $summary_url\n";
print "summary:\n\n";
$summary_string = `lynx -source $summary_url`; # fetch data
$summary_string =~ s/^.*?<p class="m-0">\w+//gs; # strip everything prior to description
$summary_string =~ s/div id="videos">//gs; # needed when summary includes link to video
$summary_string =~ s/<\/p>.*//gs; # strip everything after this paragraph (</p>)
$summary_string =~ s/<.*>//gs; # strip any remaining html tags
$summary_string =~ s/^\w+//gs;
print $summary_string;
print "\n";
}



Reply
#55
sandmancl

why not try to port this to python yourself? it would be a great way to learn python and help the community at the same time?

in the end though, we really need code like this to be in the cvs so we can have a screen dedicated to tv shows.
I'm not an expert but I play one at work.
Reply
#56
i'm just adding another plus for this.... i use xbmc mainly for tv shows and would happily scrap movie lookup for tv lookup!
Reply
#57
i dont know if the code will help you, but my script 'tv.com' does gather quite a lot of information from that site already.
on xbmcscripts.com
Reply
#58
why don't u guys have a look at my scraper code?

no c code, just regexp + xml. the link is on this very page.
very little documentation, but if you compare my imdb.xml scraper to the imdb scraper provided in xbmc cvs, you should be able to figure out the basics...

i considered supporting python based scrapers but imho it won't happen since xbmc is supposed to not require python for base functionality.
Reply
#59
this really needs to be a built-in screen for xbmc, not an add-on script.
I'm not an expert but I play one at work.
Reply
#60
just thought id post this link:
http://forum.team-mediaportal.com/viewtop....tart=75

halfway down there is some nice pics for a possible mytv design if anyone is interested Wink
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 17

Logout Mark Read Team Forum Stats Members Help
I want a "My TV" section (with a separate database)1