NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums General General Discussion v
« Previous 1 … 18 19 20 21 22 … 159 Next »
Running a javascript command from Windows Address Bar FOLLOWING the Web address?

 
  • 0 Vote(s) - 0 Average
Running a javascript command from Windows Address Bar FOLLOWING the Web address?
jksmurf
Offline

Posting Freak

HK (DMBTH)
Posts: 3,590
Threads: 410
Joined: Jul 2005
#1
2011-02-13, 02:51 PM (This post was last modified: 2011-02-13, 03:01 PM by jksmurf.)
I scrape all my EPG's using TVxB which generally works well, but I am stuck on a page which would allow me only 1 days worth of EPG. Normally I can work out the release sequence to download a cache of schedule pages but this site:

http://www.setanta.com/HongKong/TV-Listings/

does it with javascript. ie. to get the NEXT days schedule I need to click the date which runs (one of) these at a time:

javascript:__doPostBack('ctl00$cphForm$AllCols$tvlHeader$rptDays$ctl00$btnDay','')
javascript:__doPostBack('ctl00$cphForm$AllCols$tvlHeader$rptDays$ctl01$btnDay','')
javascript:__doPostBack('ctl00$cphForm$AllCols$tvlHeader$rptDays$ctl02$btnDay','')
javascript:__doPostBack('ctl00$cphForm$AllCols$tvlHeader$rptDays$ctl03$btnDay','')
javascript:__doPostBack('ctl00$cphForm$AllCols$tvlHeader$rptDays$ctl04$btnDay','')
javascript:__doPostBack('ctl00$cphForm$AllCols$tvlHeader$rptDays$ctl05$btnDay','')
javascript:__doPostBack('ctl00$cphForm$AllCols$tvlHeader$rptDays$ctl06$btnDay','')

Is there some way I can combine http://www.setanta.com/HongKong/TV-Listings/ with one of the above javascript lines, to get a DIRECT link to the selected days page, so TVxB can download it and cache a set of them automatically using a release sequence (relseq?)

Ta!

k.
ASUS STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | AC86U/AC68U | USB-UIRT | RPi4 Libreelec | Sony Bravia LCD X9000F Android TV |
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#2
2011-02-14, 01:03 AM
can't be done without either taking apart that query, or some code in the pages themselves...
tho you could use script to load the pages...it works if you just paste postback in addresss bar of firefox while on main page.....
but easier if you could scrippt with calling program...not sure if adding pages together manually would work for your scraper...
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
jksmurf
Offline

Posting Freak

HK (DMBTH)
Posts: 3,590
Threads: 410
Joined: Jul 2005
#3
2011-02-14, 01:47 AM
pBS Wrote:can't be done without either taking apart that query, or some code in the pages themselves...
tho you could use script to load the pages...it works if you just paste postback in addresss bar of firefox while on main page.....
but easier if you could scrippt with calling program...not sure if adding pages together manually would work for your scraper...

Hmm, I really don't know enough about TVxB to do any scripting, it basically uses wget to download and cache the pages, then parses the data. The issue is I can't get past the first step, "download and cache the pages" for a weeks EPG. Can't even fool the date (ven if knew how) as it is on the server, not based on my PC's date.

k.
ASUS STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | AC86U/AC68U | USB-UIRT | RPi4 Libreelec | Sony Bravia LCD X9000F Android TV |
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#4
2011-02-14, 02:10 AM
have you tried concatenating the files manually then point TVxB to the all-days-in-one page as a local address? [file://path/to/file.html]
if it works then automating the appending of the web pages could be done in .vbs before epg update..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
jksmurf
Offline

Posting Freak

HK (DMBTH)
Posts: 3,590
Threads: 410
Joined: Jul 2005
#5
2011-02-14, 08:01 AM
I'll try, and it might work if I can insert an identifier for the date in each subsequent concatentation.

However I looked at the source for http://www.setanta.com/HongKong/TV-Listings/ and it doesn't show exactly which day the times belong to, just a list of days which chows which one you clicked (in javascript...) . TVxB throws out duplicate times if it sees them as the same day.

k.
ASUS STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | AC86U/AC68U | USB-UIRT | RPi4 Libreelec | Sony Bravia LCD X9000F Android TV |
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#6
2011-02-15, 12:26 AM
hmmm,in that case, maybe just a script to download all the pages separately, then point to each as local address in TVxB..[file://monday.xml thru sunday.xml]
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
jksmurf
Offline

Posting Freak

HK (DMBTH)
Posts: 3,590
Threads: 410
Joined: Jul 2005
#7
2011-02-15, 12:48 AM
That might be easier!

I think I can use downloadmethod=cache so the script does the download to the cache, then the resulting files would need to be html in this format TVxb-tvbpearl.hk-20090605.html so that TVxB can parse them. I guess the date can be in the file name. Need to try a few things.

BUT ... I have no idea about such a vbs script, can you point me to somewhere I can get a few clues how to run it to download and name the files (basically to replace what wget does I guess - boy this opens up possibilities on other javascript-based online EPGs...)!

Cheers

k.
ASUS STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | AC86U/AC68U | USB-UIRT | RPi4 Libreelec | Sony Bravia LCD X9000F Android TV |
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#8
2011-02-15, 03:06 AM
i looked around but couldn't put my finger on it..tried a couple of things that didn't work..[i don't vbs all that well either]
i know autoit3 can do it...and probably easier to learn..probably even examples to play with...
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
jksmurf
Offline

Posting Freak

HK (DMBTH)
Posts: 3,590
Threads: 410
Joined: Jul 2005
#9
2011-02-21, 01:34 PM
pBS Wrote:i know autoit3 can do it...and probably easier to learn..probably even examples to play with...

I used to code vbs macros in Excel "OK" but , must admit AutoIt seems less intuitive.

BUT ...I persevered and got some way along - it "half works". No responses on the autoit forum to my terrible coding, so if anyone is of a mind to help solve the issue of it hanging, then I'm good to go. Script attached ... :o

k.
ASUS STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | AC86U/AC68U | USB-UIRT | RPi4 Libreelec | Sony Bravia LCD X9000F Android TV |
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#10
2011-02-21, 08:40 PM (This post was last modified: 2011-02-21, 10:38 PM by pBS.)
yea, those forums are kinda snobby, makes one appreciate the helpfulness here..Smile

hmm, add a ",0" to end of ienavigate lines to not wait for page reload,[cuz it isn't reloading actually,just using javascript to alter what shows up]
[just javascript navigations, not the first one..]
and can go straight to page with first nav, http://www.setanta.com/HongKong/TV-Listings/
if you waited about 5 mins your script would continue after page timed out..Smile that's why nowait works..
Code:
_IENavigate($oIE,"javascript:__doPostBack('ctl00$cphForm$AllCols$tvlHeader$rptDays$ctl03$btnDay','')",0)
SaveTVxBhtml()
this also saves html, but not as nicely re-formatted as ie saves..
Code:
Func SaveTVxBhtml()
sleep(3000)
$SaveDate = @YEAR&@MON&$MDAYALT
$sHTML = _IEDocReadHTML ($oIE)
filewriteline($savedate & ".html",$sHTML)
endfunc

aha! needed instance 3 not 2 for type, and some other typos etc..uploading working script..Big Grin
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): 1 2 3 4 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Multiple PIP windows in Firefox Graham 0 1,776 2020-09-25, 11:45 AM
Last Post: Graham
  Why Do People Upgrade to Windows 10? ga_mueller 12 8,280 2019-08-11, 01:21 PM
Last Post: Ludron
  Windows 10 Ramdrive for buffer PaulW 1 1,786 2018-10-16, 10:45 PM
Last Post: gEd
  Downgrade Windows Reddwarf 9 4,542 2017-05-26, 07:12 PM
Last Post: tonyjohn29
  Windows 10 Preview removes command prompt p37307 13 5,827 2016-12-10, 03:49 AM
Last Post: johnsonx42
  Windows 10 Update September 29, 2016 — KB3194496 p37307 0 2,678 2016-09-30, 09:32 AM
Last Post: p37307
  Windows 10 Anniversary NPVR fullscreen flicker and freeze fix p37307 1 3,238 2016-08-11, 02:59 AM
Last Post: sub
  windows 10 jrhcom 3 3,352 2015-10-07, 10:43 PM
Last Post: jrhcom
  Windows 10 DVD Player app craigrs84 10 6,835 2015-09-10, 11:06 PM
Last Post: sub
  NPVR getting some props now that Windows Media Center is going away pcostanza 6 4,150 2015-08-24, 10:20 PM
Last Post: johnsonx42

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode