Read loop web pages converting to text

Asked

Viewed 52 times

0

I need to read several web pages successively in loop, converting each page to text.

The goal is to read quotes of various shares, Yahoo Finance website, for example. I’ve tried several resources, the last being the WebBrowser, the problem is that from a number of pages read it happens that:

  • the program stops responding or
  • in some situations the page is incomplete.

I’ve also tried using the functions

  • Function Webgetdata(const Useragent, URL: string): string;
  • Function Geturlcontent(const Url: string): string;
  • Function Wininet_httpget(const Url: string): string;Overload;

Some of Stackoverflow himself (English or Portuguese) but also unsuccessful.

  • Could post the code you implemented or tried to implement?

  • I’ve done programs like this with Indy. I think the "trick" is to take a short break between a request and another so as not to overload the server.

  • What is your version of Delphi?

  • About the code, as I said, I made several attempts. Then it would be difficult to post them all. Pause between calls I’ve also entered, with Sleep(). Delphi Tokyo Version.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.