[R] Web-scraping newbie - dynamic table into R?

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Tue Apr 21 12:32:55 CEST 2020


On Sun, 19 Apr 2020 at 22:34, Julio Farach <jfarach using gmail.com> wrote:

> But, I'm seeking the last 10 draws shown on the "Winning Numbers," or
> 4th tab.

The "Network" tab in browser developer tools (usually accessible by
pressing F12) demonstrates that the "Winning Numbers" are fetched in
JSON format by means of an XHR from
<https://www.galottery.com/api/v2/draw-games/draws/?previous-draws=10&game-names=ikeno>.

The server checks the User-Agent: header and returns a 403 error to
clients that don't look like browsers, which probably means that the
website ToS forbids programmatic access.

-- 
Best regards,
Ivan



More information about the R-help mailing list