You are here

urldate with different calendar

8 posts / 0 new
Last post
rapidiptv
Offline
rapidiptv's picture
Joined: 8 years
Last seen: 3 months
urldate with different calendar

Hello,

I came across an Iranian website for EPG. The problem is that the site doesn't use the normal Gregorian Calendar. For example this is the index page:

http://tv1.irib.ir/portal/operationalconductor/view?dateview

For tomorrow it's like this:

http://tv1.irib.ir/portal/operationalconductor/view?dateview=1395/08/30

The day after tomorrow:

http://tv1.irib.ir/portal/operationalconductor/view?dateview=1395/09/01

How can I instruct webgrab to use this calendar instead of normal calendar? Is there a way??

 

Thanks in advance

rapidiptv
Offline
rapidiptv's picture
Joined: 8 years
Last seen: 3 months

Yeah seems like it. Maybe this calendar should be added to WebGrabPlus??

rapidiptv
Offline
rapidiptv's picture
Joined: 8 years
Last seen: 3 months

I just ran webgrab under windows 10 (virtual) and it actually created DateStrings with Persian Calendar if the culture is set fa-IR ! WOW! but under windows XP (virtual) it would always create Gregorian Calendar wether the cultureinfo is fa-IR or not.
This was really interesting to me!

rapidiptv
Offline
rapidiptv's picture
Joined: 8 years
Last seen: 3 months

I have came up with this INI for tv2.ir but it only works for 1 day! It I set timespan of my config file to more than 0, this ini will not grab anything. It just works for today. Do you have any suggestions? The site uses 1 index page for 7days and it uses .NET Ticks to seperate days from each other in the source. I can not instruct the webgrab to grab correctly.

Attachments: 
rapidiptv
Offline
rapidiptv's picture
Joined: 8 years
Last seen: 3 months
Blackbear199 wrote:

if you look at the page data there 7 days epg but....

its today and the previous 6 days not today and the next 6.

look at your debug,for todays date...[  Debug ]      blockstart   (bs): " id="panel-636156288000000000

now look at the page data...

 <div role="tabpanel" class="tab-pane fade in " id="panel-636151104000000000">
 <div role="tabpanel" class="tab-pane fade in " id="panel-636151968000000000">
 <div role="tabpanel" class="tab-pane fade in " id="panel-636152832000000000">
 <div role="tabpanel" class="tab-pane fade in " id="panel-636153696000000000">
 <div role="tabpanel" class="tab-pane fade in " id="panel-636154560000000000">
 <div role="tabpanel" class="tab-pane fade in " id="panel-636155424000000000">
 <div role="tabpanel" class="tab-pane fade in " id="panel-636156288000000000">

so the only data you getting is for the last day as the rest of it is from before today(the TICK date number is lower).

 

 

 

So what about now? I still can't get anything besides today's schedule! And the next days are available now. WebGrab+ doesn't work the way I think is working....

rapidiptv
Offline
rapidiptv's picture
Joined: 8 years
Last seen: 3 months
Blackbear199 wrote:

your problem is how your assigning the date value to index_variable_element.

index_variable_element.modify {set|'urldate'}

i explained this in another post but webgrab creates all the url_index http adresses before it grabs the pages.

so your urldate that your trying to use to filter the day with the date in the showsplit will never work.

when its gets to the showsplit the urldate value has already been stepped through for x days(timespan= setting).

since the url_index doesnt use the urldate in it so each days programming is grabbed on a separate page.

what are your options..you have one.

change yor maxdays= setting to 7.1

this tells webgrab all 7 days epg programming are all on one day.

for your showsplit just grab all the shows,dont worry about the each day section.

index_showsplit.scrub {multi|<tr class="display-row||</tr>|</tr>}

this will grab all the shows.webgrab will start with the first one and use it as the first show today and figure out the days itself.

The problem is that sometimes the first item is not today's EPG but previous days! This site updates 1 week schedule every Saturday!

Can I use LOOP method??

rapidiptv
Offline
rapidiptv's picture
Joined: 8 years
Last seen: 3 months

Oh yes I have forgotten about it!! Thanks so much, I will test this.

rapidiptv
Offline
rapidiptv's picture
Joined: 8 years
Last seen: 3 months

it worked but not with the "firstday=6012345" that you wrote.

documentation:

It needs to be entered as 7 numbers, from the first : days to skip on Monday .. To the last : days to skip on Sunday.

 

it worked with this: firstday=2345601 because for Monday, the program has to skip 2 days (Saturday and Sunday), so the string begins with 2 ...

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl