scrapeOP
scrapeOP copied to clipboard
Scraping soccer odds fails
Since 2022-01-21 the scraping of soccer odds from oddsportal does return only empty values. It seems like some changes were made to the oddsprotal html, so the scaping needs to be corrected.
Data will be saved in the following directory: /home/user/scrapeOP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[]
Function crashed, probable reason : no games scraped (empty season)
Traceback (most recent call last):
File "FinalScraper.py", line 17, in <module>
scrape_oddsportal_next_games(sport = 'soccer', country = 'france', league = 'ligue-1', season = '2021')
File "/home/user/scrapeOP/functions.py", line 1386, in scrape_oddsportal_next_games
df = create_clean_table_three_ways(df)
File "/home/user/scrapeOP/create_clean_table.py", line 70, in create_clean_table_three_ways
nbooks = df['Bookmaker'].nunique()
TypeError: 'int' object is not subscriptable
I'm having the same issue. Any solution?
what worked for me was to replace the two lines in the "create_clean_table.py" that say...
for book in df['Bookmaker'].unique():
with...
for book in range(df['Bookmaker'].unique()):
Unfortunately that didn't work for me. I currently use my own (rather dirty) script to scrape the Bundesliga average odds
Some problem here like dauhonk. Any solution?
Hi, A new version was released today. The package is now adapted to the latest version of pandas, and corrects a few bugs related to cookies.
Hoping it solves your problem. Feel free to open a new issue if the new version still contains your bug.