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 3583669 commit a0846d3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scraper.py
Expand Up @@ -14,7 +14,7 @@
f2 = []
all_rows = []
fighters = []
fights_table = []
fights=[]



Expand All @@ -34,9 +34,11 @@ 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= 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"})

for fight in fights:

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

try:

Expand Down

0 comments on commit a0846d3

Please sign in to comment.