- Home
- Premium Memberships
- Lottery Results
- Forums
- Predictions
- Lottery Post Videos
- News
- Search Drawings
- Search Lottery Post
- Lottery Systems
- Lottery Charts
- Lottery Wheels
- Worldwide Jackpots
- Quick Picks
- On This Day in History
- Blogs
- Online Games
- Premium Features
- Contact Us
- Whitelist Lottery Post
- Rules
- Lottery Book Store
- Lottery Post Gift Shop
The time is now 1:07 pm
You last visited
June 3, 2026, 5:36 pm
All times shown are
Eastern Time (GMT-5:00)
Coding issue... bonus balls.
Published:
I have my build script down to a single function that works flawlessly for scraping the PA lottery website for the full histories of the following games...
Pick 2,3,4 and 5 mid and eve
Match 6, Cash 5, Treasure Hunt.
The issue... only able to grab the white balls from Cash 4 Life, Power Ball and Mega Millions.
Why? I used a regex to drop the non numeric data so I would skip storing the pick N wild ball data, and it was like using a chain saw where a scalpel was called for...
I need to come up with a way to not only read the bonus ball data, but to divert it to it's own csv file...
The diversion is the easier part.
Gotta spend some time on this... i am almost there with the build script, and if it works, the update script will be easy.

Comments
2 possible solutions present immediately...
1. Have a "bonus ball" version. Not ideal bjt if it works...
2. Write a smarter regex filter (regex = regular expression). I already have it dismissing text and only recording numbers, but it cuts off everything after the first text data. Works for skipping wild ball data, not so much for needed bonus ball data.
In this way, the update version can use the last date in the csv file created with the build script, and just capture dates ahead of it...
Will give the big game APIs a closer look tomorrow. Looks like I will need to register for an API key, but MUSL has both games as endpoints... did you know that the powerball data includes draw ordering of the balls?
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