sintamar commited on
Commit
d09dd0b
·
verified ·
1 Parent(s): 3f38591

Update extract.py

Browse files
Files changed (1) hide show
  1. extract.py +4 -4
extract.py CHANGED
@@ -21,9 +21,9 @@ def take_webdata(url):
21
  screenshot = wd.get_screenshot_as_png()
22
  html = wd.execute_script("return document.documentElement.outerHTML;")
23
  soup = BeautifulSoup(html, "html.parser")
24
- div_find = soup.find("div", id="tournament-table", class_="tournament-table-standings")
25
- table_find = div_find.find("table") if div_find else None
26
- #tournament_div = soup.find("div", id="tournament-table", class_="tournament-table-standings")
27
 
28
 
29
  except WebDriverException as e:
@@ -32,4 +32,4 @@ def take_webdata(url):
32
  if wd:
33
  wd.quit()
34
 
35
- return html , table_find
 
21
  screenshot = wd.get_screenshot_as_png()
22
  html = wd.execute_script("return document.documentElement.outerHTML;")
23
  soup = BeautifulSoup(html, "html.parser")
24
+ #div_find = soup.find("div", id="tournament-table", class_="tournament-table-standings")
25
+ #table_find = div_find.find("table") if div_find else None
26
+ tournament_div = soup.find("div", id="tournament-table", class_="tournament-table-standings")
27
 
28
 
29
  except WebDriverException as e:
 
32
  if wd:
33
  wd.quit()
34
 
35
+ return html , tournament_div