Skip to content

Commit

Permalink
Limit scraping for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
msj committed Dec 18, 2023
1 parent 8c60d03 commit 9a20f44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions courtscraper/spiders/chancery.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ def get_case_numbers(self, year):
yield case_number

def start_requests(self):
count = 0
for case_number in self.case_numbers:
if count > 10:
break
count += 1
yield Request(
ChancerySpider.url,
meta={
Expand Down
4 changes: 4 additions & 0 deletions courtscraper/spiders/civil.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ def __init__(self, division="2", year=2023, **kwargs):
super().__init__(**kwargs)

def start_requests(self):
count = 0
for case_number in self.case_numbers:
if count > 10:
break
count += 1
yield Request(
CivilSpider.url,
meta={
Expand Down

0 comments on commit 9a20f44

Please sign in to comment.