Jump to content

Script to get website data and save to file


Recommended Posts

As the title suggests i would like a script to grab some data from a website and save it to a text file

The site in question is a lotteries site https://gnetwork.com.au/oz-lotto-results/

All i need it to do is grab the latest results and save to a file, preferrably showing the date and columns with the results below it as shown on the site

I have no idea how to go about it or the skill to code it. Any help is appreciated

Link to comment
Share on other sites

All you have to do is :
-
grab the source code of the page using Inet, winhttp, curl, etc
- parse the content of the table  <table id="tablepress-1"   to an array
the latest daily results are in  <tbody  on  row-2 
- then use the content of this array to write to a file, fill a listview...

BTW instead of a .txt file you might build a .csv

Link to comment
Share on other sites

  • Moderators
On 2/13/2023 at 7:46 PM, justsomenoob said:

I have no idea how to go about it or the skill to code it.

As you can see from mikell's response above, we are more than happy to help with the first problem so long as you understand we're here to guide, not write it for you. Take what suggestions you receive and try something on your own. If you get stuck, post your code (even non-running) here and we will do our best to assist.

I suggest beginning with the first bullet. If you search the forum there are numerous examples of obtaining a page's source that you can study and modify to your needs.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...