Skip to content

Commit b7f5279

Browse files
authoredAug 9, 2023
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
 

Diff for: ‎Zomato Scraper/zomato.py

+5-5
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",{"class":"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)
Please sign in to comment.