updated passing string literal to read_html as it is soon to be deprecated using StringIO & added historical analysis back to daily3

This commit is contained in:
xi-pinmping committed 2024-07-29 16:21:37 -04:00
1 parent 15b517d642
commit b5c0a6e27f
12 files changed
+28 -17

No files matched your search

+1 -1
View File
@@ -1,2 +1,2 @@
Forecast,Chance
3 - 6 - 14 - 18 - 20 - 25,71/35420
9 - 12 - 13 - 19 - 20 - 22,12/6325
1 Forecast Chance
2 3 - 6 - 14 - 18 - 20 - 25 9 - 12 - 13 - 19 - 20 - 22 71/35420 12/6325
+3 -2
View File
@@ -3,6 +3,7 @@ from fractions import Fraction as frac
import pandas as pd
import requests
from collections import Counter
from io import StringIO
import csv
def get_data():
@@ -14,9 +15,9 @@ def get_data():
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
"X-Requested-With": "XMLHttpRequest"
}
r = requests.get(url, headers=header)
# Get web data
dfs = list(pd.read_html(requests.get(url, headers=header).text))
dfs = list(pd.read_html(StringIO(r.text)))
pd.set_option('display.max_rows', None)
# Specifies no max rows, otherwise only shows 10 records
df = pd.concat([dfs[0], salvaged], ignore_index=True)
+1 -1
View File
@@ -1,2 +1,2 @@
Forecast,Chance
2 - 3 - 6,10379/15000
0 - 7 - 8,163/7500
1 Forecast Chance
2 2 - 3 - 6 0 - 7 - 8 10379/15000 163/7500
+1 -1
View File
@@ -1,2 +1,2 @@
Forecast,Chance
1 - 3 - 4 - 8,137/2500
2 - 4 - 7 - 9,107/2000
1 Forecast Chance
2 1 - 3 - 4 - 8 2 - 4 - 7 - 9 137/2500 107/2000
+7 -2
View File
@@ -3,19 +3,24 @@ from fractions import Fraction as frac
import pandas as pd
import requests
from collections import Counter
from io import StringIO
import csv
def get_data():
df_old = pd.read_excel('./excel_lotto_records/cash25.xlsx')
salvaged = df_old[['Date', 'Numbers']]
url = 'https://wvlottery.com/draw-games/daily-3/?game-analyze=daily-3&what-to-search=historysearch&date-range=-1'
header = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
"X-Requested-With": "XMLHttpRequest"
}
r = requests.get(url, headers=header)
# Get web data
dfs = list(pd.read_html(requests.get(url, headers=header).text))
dfs = list(pd.read_html(StringIO(r.text)))
pd.set_option('display.max_rows', None)
# Specifies no max rows, otherwise only shows 10 records
df = dfs[0]
df = pd.concat([dfs[0], salvaged], ignore_index=True)
df2 = df[['Date', 'Numbers']]
date = list(df2['Date'])
nums = list(df2['Numbers'].astype('str'))
+3 -1
View File
@@ -3,6 +3,7 @@ from fractions import Fraction as frac
import pandas as pd
import requests
from collections import Counter
from io import StringIO
import csv
def get_data():
@@ -14,8 +15,9 @@ def get_data():
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
"X-Requested-With": "XMLHttpRequest"
}
r = requests.get(url, headers=header)
# Get web data
dfs = list(pd.read_html(requests.get(url, headers=header).text))
dfs = list(pd.read_html(StringIO(r.text)))
pd.set_option('display.max_rows', None)
# Specifies no max rows, otherwise only shows 10 records
df = pd.concat([dfs[0], salvaged], ignore_index=True)
+1 -1
View File
@@ -1,2 +1,2 @@
Forecast,SB,Chance
14 - 17 - 32 - 48 - 52,[10],79/12994800
3 - 11 - 15 - 38 - 51,[9],43/6497400
1 Forecast SB Chance
2 14 - 17 - 32 - 48 - 52 3 - 11 - 15 - 38 - 51 [10] [9] 79/12994800 43/6497400
+3 -3
View File
@@ -1,9 +1,9 @@
# WVLottopy: Matteo DiBiagio
#from django_lottopy.lottopy_site.lottopy.lottopy_web_edition.megamil import Forecast
from fractions import Fraction as frac
import pandas as pd
import requests
from collections import Counter
from io import StringIO
import csv
def get_data():
@@ -14,9 +14,9 @@ def get_data():
header = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/113.0",
}
r = requests.get(url, headers=header)
# Get web data
dfs = list(pd.read_html(requests.get(url, headers=header).text))
dfs = list(pd.read_html(StringIO(r.text)))
pd.set_option('display.max_rows', None)
# Specifies no max rows, otherwise only shows 10 records
df = pd.concat([dfs[0], salvaged], ignore_index=True)
+3 -1
View File
@@ -3,6 +3,7 @@ from fractions import Fraction as frac
import pandas as pd
import requests
from collections import Counter
from io import StringIO
import csv
def get_data():
@@ -14,8 +15,9 @@ def get_data():
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
"X-Requested-With": "XMLHttpRequest"
}
r = requests.get(url, headers=header)
# Get web data
dfs = list(pd.read_html(requests.get(url, headers=header).text))
dfs = list(pd.read_html(StringIO(r.text)))
pd.set_option('display.max_rows', None)
# Specifies no max rows, otherwise only shows 10 records
df = pd.concat([dfs[0], salvaged], ignore_index=True)
+3 -2
View File
@@ -3,6 +3,7 @@ from fractions import Fraction as frac
import pandas as pd
import requests
from collections import Counter
from io import StringIO
import csv
@@ -15,9 +16,9 @@ def get_data():
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
"X-Requested-With": "XMLHttpRequest"
}
r = requests.get(url, headers=header)
# Get web data
dfs = list(pd.read_html(requests.get(url, headers=header).text))
dfs = list(pd.read_html(StringIO(r.text)))
pd.set_option('display.max_rows', None)
# Specifies no max rows, otherwise only shows 10 records
df = pd.concat([dfs[0], salvaged], ignore_index=True)
+1 -1
View File
@@ -1,2 +1,2 @@
Forecast,MB,Chance
1 - 15 - 29 - 38 - 46,[9],2/4584475
3 - 26 - 33 - 61 - 66,[7],43/100858450
1 Forecast MB Chance
2 1 - 15 - 29 - 38 - 46 3 - 26 - 33 - 61 - 66 [9] [7] 2/4584475 43/100858450
+1 -1
View File
@@ -1,2 +1,2 @@
Forecast,PB,Chance
19 - 36 - 37 - 47 - 58,[18],5/7492342
19 - 24 - 27 - 33 - 64,[20],191/292201338
1 Forecast PB Chance
2 19 - 36 - 37 - 47 - 58 19 - 24 - 27 - 33 - 64 [18] [20] 5/7492342 191/292201338