Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IntGetFile
#1
Hi,

I'm trying to use IntGetFile to save the table displayed at the URL in the code, but not having any luck.  Please try running this to see what you get.

Maybe I need to adjust one of the flags or something like that?  Any insights would be appreciated.


str ext = ".html"
str folder
str file

folder = "C:\test\"
file.from(folder "test" ext)
IntGetFile "https://www.benzinga.com/calendar/ratings" file3 16
#2
IntGetFile does not run scripts. Try HtmlDoc class.

Macro Macro946
Code:
Copy      Help
HtmlDoc d
d.SetOptions(2)
d.InitFromWeb("https://www.benzinga.com/calendar/ratings")
str html=d.GetHtml()
out html
;html.setfile(file3)
#3
Thanks.  I tried html.setfile but the saved file still shows an error where the table data is on the live web page.  Any other insights would be appreciated if it might be possible to save data from this type of table (without unlocking my machine while I am on vacation  Shy ).
#4
HtmlDoc uses the same code as Internet Explorer (IE). When I open the page in IE, the table is empty. Ok in Firefox. It means the website does not support IE.

Open the page in Firefox or Chrome and try one of:
- select all, copy to clipboard, get clipboard text or HTML. To get HTML: str html.getclip("HTML Format")
- FFNode, like here: https://www.quickmacros.com/forum/showth...6#pid34296
#5
OK.  Thanks for the insight, but I want to do this while my PC is locked and I don't have Firefox.  When I just save the web page using Chrome that saves the table too, as desired.  I think I found an answer below.  Will use QM to send command line.  But if any QM aces out there are already using Wget and know the command line, please pass along.   Smile

http://gnuwin32.sourceforge.net/packages/wget.htm


Forum Jump:


Users browsing this thread: 1 Guest(s)