Skip to content

Commit

Permalink
More time delays.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasThoren committed Sep 1, 2016
1 parent 7719158 commit 8681acd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions realestate/lib/scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def login(self):
time.sleep(2.0)

self.enter_password()
time.sleep(10.0)
time.sleep(15.0)

def is_logged_in(self):
"""Confirm that login was successful."""
Expand Down Expand Up @@ -288,7 +288,7 @@ def search_parameters(self, search_date):
time.sleep(1.0)

self.click_search_button()
time.sleep(10.0)
time.sleep(15.0)

# Parse results
def parse_results(self, year, month, day):
Expand Down Expand Up @@ -318,7 +318,7 @@ def parse_results(self, year, month, day):
log.debug('Page: %d', i)

self.parse_page(i, year, month, day)
time.sleep(10.0)
time.sleep(15.0)

def parse_page(self, i, year, month, day):
"""Parse results page for sale document IDs."""
Expand Down Expand Up @@ -483,9 +483,8 @@ def cycle_through_dates(self):

def main(self):
"""The main scrape method."""
self.login()
self.login() # Has built-in delay after

time.sleep(10.0)
assert self.is_logged_in()

try:
Expand Down

0 comments on commit 8681acd

Please sign in to comment.