<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
	<channel>
		<title>PA lottery uses aspx file to present tables of draw history.</title>
		<link>/blogentry/195717</link>
		<atom:link href="https://www.lotterypost.com/rss/blogcomments/195717" rel="self" type="application/rss+xml" />
		<description>hypersoniq's Blog: PA lottery uses aspx file to present tables of draw history.</description>
		<dc:language>en-us</dc:language>
		<generator>Lottery Post RSS Generator</generator>
		<item>
			<title>Original Blog Entry: PA lottery uses aspx file to present tables of draw history.</title>
			<link>/blogentry/195717</link>
			<guid isPermaLink="true">/blogentry/195717</guid>
			<pubDate>Wed, 19 Nov 2025 14:57:34 GMT</pubDate>
			<dc:creator>hypersoniq</dc:creator>
			<description><![CDATA[<p>Microsoft Active Server Pages, the technology used by the PA lottery to present 1 year of draw history for any of their games.<br /><br />There are 2 main variables passed via query string parameters, the id, tells it which game to display, and year, so you can choose the year.<br /><br />I can fetch a requested page by passing in variables for the task at hand.<br /><br />For example, this is the full url to display the PA pick 3 evening results for 2025...<br /><br />https://www.palottery.state.pa.us/Games/Print-Past-Winning-Numbers.aspx?id=2 year=2025 print=1<br /><br />I forget exactly how I found it, it was originally buried somewhere on their results pages. Through experimentation, I found the following game ID codes...<br /><br />1. Pick 3 Mid Day<br /><br />2. Pick 3 Evening (the example above)<br /><br />3. Pick 4 Mid Day<br /><br />4. Pick 4 Evening<br /><br />5. Pick 5 Mid Day<br /><br />6. Pick 5 Evening<br /><br />7. Treasure Hunt<br /><br />8. Cash 5<br /><br />11. Match 6<br /><br />12. Power Ball<br /><br />15. Mega Millions<br /><br />27. Pick 2 Evening<br /><br />31. Pick 2 Mid Day<br /><br />35. Cash 4 Life<br /><br />(There are codes for games that have ended like 10 for Mix Match and 14 for Super 7, but if the game ended.. why bother?)<br /><br />By replacing the id value with a number from above and the year value desired, you can see any full calendar year of PA lottery game history.<br /><br />The Pick 3 evening is the longest running PA game and goes back to 1977 !<br /><br />In my build script, I loop each ID through the years for each game ID and create a csv file for each.<br /><br />The update version that I plan on running once a week will go through ALL of the game IDs for the current year, updating all 14 games in one shot.<br /><br />I am still stuck on 3 games... all have a bonus ball. Since the other 11 games all work, I am going to create a separate script that can handle bonus balls... working on that today... the idea is to only grab numeric data and only use the first 6 in the list, this will effectively capture all of the 3 games and ignore the power play and double draw data. Also will skip the megaplier pre $5 era.<br /><br />Also note that if importing via spreadsheet, the date is in a text date format. I handle that conversion into an actual date type in Python, but it is also able to do this in a spreadsheet by using paste special and choosing unformatted text, then for the date column, select Date M/D/Y ... problem solved... text dates don&#x27;t sort properly, particularly if mixed with standard dates!<br /><br />So that is where I am at with the coding project, just thought I would share the URL I found to make gathering history easier for any other PA players out there.... &#x5b;&#xa0;<a href="/blogentry/195717">More</a>&#xa0;&#x5d;</p>]]></description>
			<category>Blog Entry</category>
			<category>hypersoniq</category>
			<wfw:comment>https://www.lotterypost.com/blogentry/195717</wfw:comment>
		</item>
	</channel>
</rss>

