Parse drawing date from Powerball numbers page

This commit is contained in:
2025-09-16 11:17:04 -04:00
parent 2d60940001
commit dc43d1626a

View File

@@ -41,6 +41,10 @@ func deferClose(cl io.Closer) {
func getDrawing(_ context.Context, doc extractor.Document) (*Drawing, error) {
var drawing Drawing
dateStr, err := doc.SelectFirst("#numbers .title-date").Text()
drawing.Date, err = time.Parse("Mon, Jan 2, 2006", dateStr)
nums := doc.Select("div.game-ball-group div.white-balls")
if len(nums) != 5 {