Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmaloney committed Aug 11, 2019
1 parent c080ced commit 3583669
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scraper.py
Expand Up @@ -14,6 +14,8 @@
f2 = []
all_rows = []
fighters = []
fights_table = []



def scrape_data():
Expand All @@ -32,8 +34,9 @@ def scrape_data():
h2 = soup.find("h2")
e_name.append(h2.text.strip())

fights_table = soup.find('table',{'class':"b-fight-details__table b-fight-details__table_style_margin-top b-fight-details__table_type_event-details js-fight-table"}).find('tbody', 'class':{"b-fight-details__table-body"}).find('tr').find_next('tr')
fighters = fights_table.find_all('a', {"href": re.compile("http://ufcstats.com/fighter-details")})
fights_table = soup.find('table',{'class':"b-fight-details__table b-fight-details__table_style_margin-top b-fight-details__table_type_event-details js-fight-table"}.find('tbody',{'class':"b-fight-details__table-body"}).find('tr').find_next('tr'),

fighters = fights_table.find_all('a', {"href": re.compile("http://ufcstats.com/fighter-details")}))

try:

Expand Down

0 comments on commit 3583669

Please sign in to comment.