Skip to content

Commit fa5af20

Browse files
committed
Longer sleep
1 parent 2e82e00 commit fa5af20

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

data/scrape.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,14 +508,11 @@ def scrape_nfl():
508508
headers = [column(h) for h in headers]
509509
headers = ["name", "pos", "team"] + headers
510510

511-
512511
for _ in range(50):
513512
try:
514513
soup = BeautifulSoup(
515514
DRIVER.execute_script("return document.body.innerHTML"), "html.parser"
516515
)
517-
print("")
518-
print(str(soup))
519516
except Exception as e:
520517
logging.warning("bailing on nfl pagination on error", exc_info=e)
521518
break
@@ -570,8 +567,9 @@ def scrape_nfl():
570567
if page % 5 == 0:
571568
logging.info("Scraping NFL: page=%d, players=%d, first_on_page=%s", page, len(players), name)
572569

570+
time.sleep(1.5)
573571
scroll()
574-
time.sleep(0.5)
572+
time.sleep(1.5)
575573
except:
576574
if page == 0:
577575
logging.exception("Failed to click next button")

0 commit comments

Comments
 (0)