Skip to content

Commit e91d8a0

Browse files
Merge pull request #2762 from avinashkranjan/deepsource-transform-5248ce2e
format code with autopep8
2 parents 7a367fc + b7f5279 commit e91d8a0

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",{"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)