Nov-07-2023, 02:35 PM
The whole table is generated bye JavaScript,so the way you do it now will not work.
Also should look if site has an API to get date more easy.
Can use Selenium ,here a working setup.
Also when use this so most this path
If not sure of Path just put
Also should look if site has an API to get date more easy.
Can use Selenium ,here a working setup.
Also when use this so most this path
Service(r"C:\cmder\bin\chromedriver.exe")
be in OS environment Path.If not sure of Path just put
chromedriver.exe
in windows folder Service(r"C:\Windows\chromedriver.exe")
.from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By import time # Setup # Cromedriver most use version that your browser use #https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5939.0/win64/chromedriver-win64.zip options = Options() #options.add_argument("--headless=new") ser = Service(r"C:\cmder\bin\chromedriver.exe") browser = webdriver.Chrome(service=ser, options=options) # Parse or automation url = 'https://sc2pulse.nephest.com/sc2/?season=56&queue=LOTV_1V1&team-type=ARRANGED&us=true&eu=true&kr=true&cn=true&bro=true&sil=true&gol=true&pla=true&dia=true&mas=true&gra=true&page=0&type=ladder&ratingAnchor=99999&idAnchor=0&count=1#ladder-top' browser.get(url) time.sleep(2) first_row = browser.find_element(By.CSS_SELECTOR, '#ladder > tbody > tr:nth-child(7)') print(first_row.text)
Output:1
7239
BasiliskSerralllllllllllllrevealed
31 87