seb943 / scrapeop Goto Github PK
View Code? Open in Web Editor NEWA python package for scraping oddsportal.com
A python package for scraping oddsportal.com
Hello to all historical results and betting odds seekers
Can somebody help me with this issue? FinalScraper.py worked and I saw the following results in the console (Function crashed, probable reason : no games scraped (empty season) but season is not empty):
We start to collect season 2012-2013
We start to scrape the page n°1
[]
We start to scrape the page n°2
[]
We start to scrape the page n°3
[]
We start to scrape the page n°4
[]
We start to scrape the page n°5
[]
We start to scrape the page n°6
[]
We start to scrape the page n°7
[]
We start to scrape the page n°8
[]
We start to scrape the page n°9
[]
We start to scrape the page n°10
[]
We start to scrape the page n°11
[]
We start to scrape the page n°12
[]
We start to scrape the page n°13
[]
We start to scrape the page n°14
[]
We start to scrape the page n°15
[]
We start to scrape the page n°16
[]
We start to scrape the page n°17
[]
We start to scrape the page n°18
[]
We start to scrape the page n°19
[]
We start to scrape the page n°20
[]
We start to scrape the page n°21
[]
We start to scrape the page n°22
[]
We start to scrape the page n°23
[]
We start to scrape the page n°24
[]
We start to scrape the page n°25
[]
Function crashed, probable reason : no games scraped (empty season)
We finished to collect season 2012-2013 !
We start to collect current season
We start to scrape the page n°1
[]
We start to scrape the page n°2
[]
We start to scrape the page n°3
[]
We start to scrape the page n°4
[]
We start to scrape the page n°5
[]
We start to scrape the page n°6
[]
We start to scrape the page n°7
[]
We start to scrape the page n°8
[]
We start to scrape the page n°9
[]
We start to scrape the page n°10
[]
We start to scrape the page n°11
[]
We start to scrape the page n°12
[]
We start to scrape the page n°13
[]
We start to scrape the page n°14
[]
We start to scrape the page n°15
[]
We start to scrape the page n°16
[]
We start to scrape the page n°17
[]
We start to scrape the page n°18
[]
We start to scrape the page n°19
[]
We start to scrape the page n°20
[]
We start to scrape the page n°21
[]
We start to scrape the page n°22
[]
We start to scrape the page n°23
[]
We start to scrape the page n°24
[]
We start to scrape the page n°25
[]
Function crashed, probable reason : no games scraped (empty season)
We finished to collect current season !
Traceback (most recent call last):
File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:\users\hp_home\documents\bets\finalscraper.py:19
scrape_oddsportal_historical(sport = 'football', country = 'europe', league = 'europa-league', start_season = '2012-2013', nseasons = 1, current_season = 'no', max_page = 25)
File ~\Documents\BETS\functions.py:1403 in scrape_oddsportal_historical
df = scrape_league_typeC(Season = start_season, sport = sport, country1 = country, tournament1 = league, nseason = nseasons, current_season = 'yes', max_page = max_page)
File ~\Documents\BETS\functions.py:950 in scrape_league_typeC
file1 = pd.read_csv('./{}/'.format(tournament1) + os.listdir('./{}/'.format(tournament1))[0], sep=';')
FileNotFoundError: [WinError 3] Системе не удается найти указанный путь: './europa-league/'
I know almost zero about coding. I'm having a problem running this code, it seems that some changes need to be made to run it with selenium4. Is this possible? Alternatively how could I get another version of selenium on my machine so this runs? Is there another solution? Sorry for the rookie questions, but this looks like a great tool!
Love this project! .. scraping OP is like the holy grail of scraping!
Its a cat and mouse game.. OP always changing their dom
-- will see if I can find ..
-->
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="user-header-oddsformat-expander"]"}
thanks for the hardwork!
After scraping, I get this error message,
/Users/ugooezekoma/code/dekoma4u/ebetting/ugoo/scrapeOP
Data will be saved in the following directory: /Users/ugooezekoma/code/dekoma4u/ebetting/ugoo/scrapeOP
We start to collect current season
We start to scrape the page n°1
[]
Function crashed, probable reason : no games scraped (empty season)
We finished to collect current season !
Traceback (most recent call last):
File "FinalScraper.py", line 19, in
scrape_oddsportal_historical(sport = 'esports', country = 'world', league = 'counter-strike-esl-pro-league-season-16', start_season = '2022', nseasons = 0, current_season = 'yes', max_page = 2)
File "/Users/ugooezekoma/code/dekoma4u/ebetting/ugoo/scrapeOP/functions.py", line 1323, in scrape_oddsportal_historical
df = scrape_league_typeA(Season = start_season, sport = sport, country1 = country, tournament1 = league, nseason = nseasons, current_season = 'yes', max_page = max_page)
File "/Users/ugooezekoma/code/dekoma4u/ebetting/ugoo/scrapeOP/functions.py", line 326, in scrape_league_typeA
file1 = pd.read_csv('./{}/'.format(tournament1) + os.listdir('./{}/'.format(tournament1))[0], sep=';')
FileNotFoundError: [Errno 2] No such file or directory: './counter-strike-esl-pro-league-season-16/'
Can you please have a look and help me fix this as soon as possible?
Hi @Seb943 - this script is outstanding & run to play with. Thank you and Well done!
Might it be possible to enhance this further to pull in not just the 1x2 (a.k.a. Home / Draw / Away) odds, but also other markets such as the following?
These are available as seperate tabs on game-specific pages such as the one below.
How might this be achieved?
https://www.oddsportal.com/soccer/world/world-cup-2022/qatar-ecuador-jsidfnm5/
Hi:
I have tried to use the code but don't know if it is still working for you.
I am facing problems to start using it.
The main error I get is "TypeError: WebDriver.init() got an unexpected keyword argument 'executable_path'"
It seems about the code but after google search I have not been able to fix it.
Thanks in advance
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
Hi, first of all what a great scraper. Thanks for all the hard work put in. I had a question, I am currently looking to expand the scraper into different bettypes. Have you every tried or thought of scraping different bettypes than the home/away markets with this scraper? Or maybe already have some code that does that? Would be cool to cooperate on this task maybe.
Kind regards,
Alan
New to Python, where is the chromedriver.exe file. I linked it to the chrome.exe file in the Project x86 directory but when I launch scraper it doesnt launch anything. Not sure what to do here.
Hi, I have some troubles getting the code to run. I have some years of experience in javascript, but never in python. Im not sure if I have implemented the chrome driver correctly on my MacBook. It shows this error when I try to run one of the commands:
scrape_oddsportal_specific_season(sport = 'soccer', country = 'finland', league = 'veikkausliiga', season = '2019', max_page = 25)
Traceback (most recent call last):
File "", line 1, in
NameError: name 'scrape_oddsportal_specific_season' is not defined
I would really appreciate if I could get some help with this issue. An alternative could also be if someone wanted to send me a file with all historical volleyball data (I know it's a lot to ask for)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.