Skip to content

Commit

Permalink
added sleep to make sure input is there
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonchanhku committed Jan 31, 2019
1 parent 6b58c5c commit 9d7bcc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scraper.py
Expand Up @@ -6,7 +6,7 @@
import re
import datetime
import sqlite3

import time
# created a list of links beforehand to iterate over

# list to store of page links
Expand Down Expand Up @@ -57,11 +57,11 @@ def scrape_data():
for fighter in fighters:
data = requests.get(fighter)
soup = BeautifulSoup(data.text, 'html.parser')

time.sleep(2)
# fighter's name
n = soup.find('span', {'class': 'b-content__title-highlight'})
f_name.append(n.text.strip())
#print(f"Scraping the following fighter: {n.text.strip()}")
print(f"Scraping the following fighter: {n.text.strip()}")

# record
rec = soup.find('span', {'class': 'b-content__title-record'})
Expand Down

0 comments on commit 9d7bcc5

Please sign in to comment.