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 b7f5279

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in 6ae131f according to the output from Autopep8. Details: None
1 parent 6ae131f commit b7f5279

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎Zomato Scraper/zomato.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@
1010
html = driver.page_source
1111
soup = BeautifulSoup(html, "html.parser")
1212

13-
container = soup.find("div",{"id":"root"})
13+
container = soup.find("div",{"id":"root"})
1414
i = 0
1515

1616
while True:
1717
i = 0
18-
for items in container.find_all("div",class_=re.compile("sc-1mo3ldo-0 sc-")):
19-
if i==0:
18+
for items in container.find_all("div",class_=re.compile("sc-1mo3ldo-0 sc-")):
19+
if i==0:
2020
i = 1
2121
continue
2222
print(items.text)
2323
first_child = items.find("div")
2424
for item in first_child:
25-
link = item.find("a",href=True)['href']
25+
link = item.find("a",href=True)['href']
2626
print(link)
2727
name = item.find("h4")
2828
print(name.text)
29-
rating = item.find("div",{"sc-1q7bklc-1 cILgox"})
29+
rating = item.find("div",{"class":"sc-1q7bklc-1 cILgox"})
3030
print(rating.text)
3131
cusine = item.find("p")
3232
print(cusine.text)

0 commit comments

Comments
(0)

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