A few more history scraping details to work out...

Published:

1. When updating, it should be checked that games not in need of an update get skipped, such as 2 or 3 per week jackpot draws.

2. Consider an update per game check box along with the update all function.

3. Make sure PB and MM read all the info, but divert bonus balls to their own file which just includes the date and column A. In both create and update versions.

Regardless of how long it takes to incorporate this into a full fledged application, this one project alone will save at least an hour per week! It will also be the key to the "calculate anywhere" vision I have for the mobile app... update ALL of history with a button click, then process the game of interest with another button click... 2 clicks to a pick!

Can't believe I did not think of this sooner... wasted all of those coding sessions trying to wrangle their sloppy RSS feed.

I can also see incorporating other scripts into the mix, so alongside classification, I could check daily things like follower data or whole history distribution statistics.

Easier to continue on the journey when you have an idea of the end product.

Right now, if I were doing Agile. This would be solving the user stories: "User wants to update all games quickly with a single button", "User wants the flexibility of choosing from multiple active games" and "User does not need to know the behind the scenes functioning of the program, it just needs to present up to date information on demand".

Entry #546

Comments

Avatar hypersoniq -
#1
Actually, the api won't be necessary... I can pull the data in, ignoring string data, and take the 5 for the white balls, also isolate the bonus ball AND ignore the multiplier for PB with a more carefully crafted regex... the space separated values end up in a nested list, along with the date...
I can take specific actions based on game type passed... back to one function for all games if it works!
If game=powerball, put the first 5 in a pbWhiteBall csv and the 6th number in a pbRedBall csv (along with the date) and ignore the multiplier value.
If game=megamillions, put the first 5 values in the mmWhiteBall csv and the sixth value in the mmGoldBall csv, nk further action needed...
And finally...
If game = cash4life, similar action to mm, with 5 values to c4lWhiteBalls csv and cash ball to c4lCashBall csv.

Important to get right for the update version of the script that will be reading the last date in each and only scraling dates between the last in the csv file and the date of the script execution.

I was actually going to grab PB and MM from the NY lottery api, but they have token limits. The api I thought I found from the MUSL wasn't an official data source.

Post a Comment

Please Log In

To use this feature you must be logged into your Lottery Post account.

Not a member yet?

If you don't yet have a Lottery Post account, it's simple and free to create one! Just tap the Register button and after a quick process you'll be part of our lottery community.

Register