Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0fdb513

Browse files
break the for loop
1 parent 3d2d7f2 commit 0fdb513

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎restaurant_names.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
url = base_url.format(city, start)
1212
response = requests.get(url)
1313
start += 30
14-
if start == 1040:
15-
break
1614
print(f"STATUS CODE: {response.status_code} FOR {response.url}")
1715
soup = BeautifulSoup(response.text, 'html.parser')
1816
names = soup.findAll('a', {'class': 'biz-name'})
@@ -28,3 +26,5 @@
2826
print(e)
2927
print(f"{count} RESTAURANTS EXTRACTED...")
3028
print(start)
29+
if start == 30:
30+
break

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /