As I know, we can do web scraping in multiple ways:
1- using simple requests and bs4
in cases that there are scripts in the source of the web page:
2- using Selenium and bs4
3- using PhantomJS
Here I am trying to scrape https://zenitbet.com/en/line/football
I knew that first approach wouldn't work, but PhantomJS didn't work either.
in this link I need the <table>
tags. But I can't get at all. Can anyone help?
My code:
from selenium import webdriver
from bs4 import BeautifulSoup
url = 'https://zenitbet.com/en/line/football'
driver = webdriver.PhantomJS(executable_path='<the_path>')
driver.get(url)
soup2 = BeautifulSoup(driver.page_source, 'html.parser')
driver.quit()
in the output, the main parts of the page which are the bet boxes, can't be found