Yesterday I got help here on reading the text of web pages with HTMLviewer. New problem today: I set the DocumentComplete event to set a property as True when the page was fully loaded and … nada.
If I don’t allow the page to fully load, my method speeds through and gives me bogus results. Any ideas?
Try the API that Anthony found for you. APIs are built to spoon-feed you the data you want.
This won’t help. I’m wanting to get the song keys from one particular website, many being songs that API doesn’t have.
Then you need to ask that website for an API. Scraping data is murky waters, as was mentioned yesterday.
Websites that behave funky are sometimes designed to do so in an attempt to prevent exactly what you are doing.
Well, maybe. But it’s 1000+ hymns, all in numerical order which matches a hymnal, easy for me to cycle through, etc. I have very little reason to think it would bother that site if I grab the song keys programmatically rather than type them one at a time.
I have reason to believe the opposite, since
DocumentComplete certainly fires for a normal website.
Further, this doesn’t really answer my question about the DocumentComplete event. Why wouldn’t it be firing? I put a BREAK in, load a URL, everything pulls up nice and tidy but the event never fires. I’m guessing I’m not understanding what it’s supposed to do.
Hm. That’s interesting info. So maybe the web site is the issue.
DocumentComplete fires only when ALL the data has been downloaded. For some reason, the page may not have downloaded entirely.