Can WebEPG grab from sites like these (Part 2) ... (1 Viewer)

Khurram

Portal Pro
May 12, 2008
211
5
Home Country
Pakistan Pakistan
I am have some more sites that I am having trouble with. I thought I would start a new thread as I didnt want a very long thread. I hope this is not a problem.

1) Can WebEPG grab a schedule from an xml file? For example, from link
hxxp://www.bbcprime.com/ajax/data/28/20090112.xml

WebEPG-Designer cant handle it all. There is an option in the grabber file format "<Listing type="Xml">", but I dont know what it does.

2) One of the sites requires a short year notation in the url
hxxp://www.vh1.com/shows/schedule/vh1/daily.jhtml?channels=none&day=01%2F20%2F09&shows=none

There seems to be only [YYYY] and not [YY]. Using the [YYYY] token, the url becomes hxxp://www.vh1.com....%2F20&show=none whereas it should be hxxp://www.vh1.com....%2F09&show=none.

3) A site ARY ZAUQ - TV GUIDE uses ajax calls (I think) to change pages for listings for day. I can grab the listing from the 1st page but what about subsequent pages?

4) I am having trouble grabbing listings from Turner Classic Movies | Schedules for TCM_India region. I can use this
hxxp://www.turnerclassicmoviesasia.com/jsp/schedule/index.jsp?currentdate=yes&nextMonth=no&channel=TCM_India

to get listing for current date, but I cant get it to work for an arbitrary date after today. I have tried to use this
hxxp://www.turnerclassicmoviesasia.com/jsp/schedule/flash_schedule.jsp
POST=channel=TCM_India,dayNumber=21,nextMonth=no,request_day=21,thisdate=2009-01-21

But the webpage I get in the Designer is for TCM_Australia, so the show times are all off. And I dont know which australian timezone it is for either.
 

Khurram

Portal Pro
May 12, 2008
211
5
Home Country
Pakistan Pakistan
I dont know about the rest but (2) can be solved by poking around in the code. The token replacement code takes place in the file WebEPG\WebEPG\RequestBuilder.cs in the function GetRequest(). Interestingly, there are more tokens in this function than mentioned in the wiki. The extra ones are as under:

[DAYS_SINCE] - dont quite understand this
[DAYOFYEAR] - obvious from the name what it does
[DAY_OF_WEEK] - sunday-0, monday=1, tuesday=2,.... The code replacing this token is preceeded by this comment:
// this fix is needed for countries where the first day (0) is Sunday (not Monday)
// those grabbers should include OffsetStart="1" in the Search tag.

I have also added a [YY] token for short year.

Now if someone can help out in the rest of the sites :)
 

Khurram

Portal Pro
May 12, 2008
211
5
Home Country
Pakistan Pakistan
Ok, (1) is also solved. See the "3-www_bleb_org.xml" grabber in the GB section to see how to contruct grabbers for listings in xml format. Now that leaves 3 and 4. Anyone got any ideas?
 

Khurram

Portal Pro
May 12, 2008
211
5
Home Country
Pakistan Pakistan
Still at it :) For (3), I have used the following in my grabber:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Grabber>
	<Info availableDays="1" timezone="Pakistan Standard Time" version="2.0"/>
	<Channels>
		<Channel id="aryzauq@aryzauq.tv" siteId=""/>
	</Channels>
	<Listing type="Html">
		<Site url="http://www.zauq.tv/FullTVGuide.aspx" post="ctl00$ScriptManager1=ctl00$ContentPlaceHolder1$UpdatePanel1|ctl00$ContentPlaceHolder1$gvPakwan,__EVENTTARGET=ctl00%24ContentPlaceHolder1%24gvPakwan,__EVENTARGUMENT=Page%24[PAGE_OFFSET],__LASTFOCUS=" external="false" encoding=""/>
		<Search startPage="1" endPage="2" />
		<Html>
			<Template name="default" start="&lt;th scope=&quot;col&quot;&gt;Show Time&lt;/th&gt;" end="">
				<SectionTemplate tags="TAS">
					<TemplateText>
&lt;td style=&quot;width:15px;&quot;&gt;
                                    &lt;img id=&quot;ctl00_ContentPlaceHolder1_gvPakwan_ctl02_Image1&quot; src=&quot;slice/images/index10_105.jpg&quot; style=&quot;border-width:0px;&quot; /&gt;
                                
&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;width:300px;&quot;&gt;
&lt;a id=&quot;ctl00_ContentPlaceHolder1_gvPakwan_ctl02_HyperLink1&quot; class=&quot;link&quot; href=&quot;ShowDetails.aspx?Id=16&quot;&gt;&lt;#TITLE&gt;&lt;/a&gt; 
&lt;/td&gt;&lt;td&gt;
                                    &lt;span id=&quot;ctl00_ContentPlaceHolder1_gvPakwan_ctl02_Label1&quot; class=&quot;icon-green style2 style4 style22 style24&quot;&gt;Wednesday&lt;/span&gt;
                                
&lt;/td&gt;&lt;td&gt;
&lt;span id=&quot;ctl00_ContentPlaceHolder1_gvPakwan_ctl02_Label12&quot; class=&quot;icon-green style2 style4 style22 style24&quot;&gt;&lt;#START&gt;&lt;/span&gt; 
&lt;/td&gt;
		  </TemplateText>
				</SectionTemplate>
			</Template>
		</Html>
	</Listing>
</Grabber>
But the grabber always returns data for page 1. I have used post the semi-colon and comma in the POST string to delimit but it made no difference.
 

Khurram

Portal Pro
May 12, 2008
211
5
Home Country
Pakistan Pakistan
In the grabber above, the value of POST is
Code:
ctl00$ScriptManager1=ctl00$ContentPlaceHolder1$UpdatePanel1|ctl00$ContentPlaceHolder1$gvPakwan
__EVENTTARGET=ctl00%24ContentPlaceHolder1%24gvPakwan
__EVENTARGUMENT=Page%24[PAGE_OFFSET]
__LASTFOCUS=

Maybe its the naming convention that is the problem (though the names are common if using asp.net master pages+content placeholder controls). Off to the source to track it down ;)

Btw, can you use multiple parameters for POST and if so, can they be separated by the comma? I have also used the semi-colon but it made no difference in the output.
 

Users who are viewing this thread

Top Bottom