Tv.com lookup
#1
hi guys,
with all the greatness of xbmc, i was surprised to see that there hasn't yet been a tv version of imdb lookup - everyone knows how great it is to be able to press 'info' and read all about the film you're about to watch. wouldn't it be great if you could do that on a tv show you've got? just click 'info' and it uses tv.com to find out the rating it got, the storyline, and even a picture if one's available. i don't know much about python, howevere seeing how complex some of the other scripts are, i don't believe this one could be that hard -isn't it similar to imdb - untill it comes to the actual episode, finding the series will be fine, then couldn't there be a list of the episodes and you select which one you want to be downloaded?
i've just had another look, and say for family guy, if your file was named:
family guy - 1x01 - death has a shadow.avi

first it looks up 'family guy' on tv.com, bringing up the first search result 'http://www.tv.com/family-guy/show/348/su...amily+guy'.

then it goes to the episode guide 'http://www.tv.com/family-guy/show/348/ep...uide.html' which as you can see, all that has changed is after "348/" there is now "episode_guide.html" so it is easy enough for the script to go to the first search result and replace anything afet the last "slash" with "episode_guide.html".

next comes the harder part - getting the right episode. i'm not sure how this would be implemented, that is up to the develepor Wink the first episode has the following page: http://www.tv.com/family-....ry.html  as you see, on this page it has: an image, rating, summary of episode, air date, cast etc. virtually the same as imdb.

please someone make this script, i will love you.

edit: just found it is possible as it's implemented on a pc media player... http://forums.gbpvr.com/showthread.php?p=43385



Reply
#2
update: i've been in contact with the developer of the working script for the pc, and although he told me that the source would be of no use as it was in c++ he then was kind enough to tell me the steps that his plugin takes, and i have copied and pasted them below:

theres a couple of things you have to do before you get the to actually reading in the page.  first you have to find it.
first way: using the url
Quote:http://www.tv.com/search.php?type=11&stype=all&qs=showname
(just replace showname with the name of the show you are searching eg
http://www.tv.com/search.php?type=11&stype=all&qs=invisible+man
that will return a list of shows.

second way: using "im feeling lucky"
this can be handy as it will hopefully take you to the correct page, but can be tricky.

i would use the first way.

once you have the shows url eg
Quote:http://www.tv.com/the-invisible-man/show/2693/summary.html
you can just replace parts of that string to get the full epsiode list, eg
Quote:http://www.tv.com/the-invisible-man/show/2693/episode_listings.html&season=0
note the "season=0" that will show you ever season

then once you have that we can begin the episode search
step
1. read in the webpage (using the episode list url)
2. build an array list of the all the episodes and their season/episode number
3. compare the episode name
remove all the "part", "the", "and","&" strings from the strings you are comparing so it will increase your chances for a match.
3.1 compare the episode/season number if no match from the episode name
since most people name their tv show files something like
showname - season[x|e|-|]episodenumber - episode name
you can easily do a search based on those criteria.

and once you have found the appropriate show, you can get the url from the page you read in and then read in that page

4. just search the final page for all the info you need.

i know it sounds complicated, and it kind of is, but its not that bad.  i get 100% success rates use my "episode lookup" feature which is just hitting one button and it automatically finds the info.  

i would recommend keep a .xml file with all the show names in it and their urls on tv.com, it will save you having to try and figure it out all the time.

about 75% of the work is ensuring you are looking up the correct show.  the rest is pretty easy.
Reply
#3
no ones interested in this?
Reply
#4
ppl certainly is.

http://www.xboxmediaplayer.de/cgi-bin....7;st=45

would be a blast to see somebody implement a tv.com scraper using my tool Smile (of course i can do it myself, but i'd like to use the time i can spend on xbmc on core development...)
Reply
#5
good to see a reply, hopefully someone will take on this task.
does anyone know where the imdb lookup is in xbmc code? so i can have a little tinker.
Reply
#6
the current imdb lookup code is in htmlscraper.dll, the source is in xbmc/tools/htmlscraper.

however, i hope we will replace it with the tool i gave the link to in my previous post. i have already successfully developed the imdb scraper with the new tool, as well as a geos.tv and iafd.com scraper. main reason for this, is that the current interface isn't extendable and quite frankly writing c code to develop scrapers is inefficient (not in terms of speed but in terms of how long it takes to develop the scraper).

i've already almost finished integrating it into xbmc in my personal code-tree (there's a memory violation bug that drives me mad :/)
Reply
#7
(spiff @ nov. 18 2005,21:23 Wrote:the current imdb lookup code is in htmlscraper.dll, the source is in xbmc/tools/htmlscraper.

however, i hope we will replace it with the tool i gave the link to in my previous post. i have already successfully developed the imdb scraper with the new tool, as well as a geos.tv and iafd.com scraper. main reason for this, is that the current interface isn't extendable and quite frankly writing c code to develop scrapers is inefficient (not in terms of speed but in terms of how long it takes to develop the scraper).

i've already almost finished integrating it into xbmc in my personal code-tree (there's a memory violation bug that drives me mad :/)
sweet,
i don't really get what this means - but i figure it means that you are basically implementing tv.com lookup and that you've almost finished?
if so great!
Reply
#8
no.

it means that i've implemented a tool for doing scrapers, and that somebody hopefully will develop a tv.com scraper using it (as i'm quite busy and quite frankly i'm sick'n'tired of figuring out regular expression...)
Reply
#9
is my script 'tv.com' of any use to you ?

from here
Reply

Logout Mark Read Team Forum Stats Members Help
Tv.com lookup0