Skip to content

Commit 647ceb8

Browse files
committed
extract the neighbourhood of restaurant
1 parent 871b257 commit 647ceb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

writing_clean_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
address = biz.find('address').contents
2323
# print(address)
2424
phone = biz.find('span', {'class': 'biz-phone'}).text
25-
region = soup.find('span', {'class': 'neighborhood-str-list'}).contents
25+
region = biz.find('span', {'class': 'neighborhood-str-list'}).contents
2626
count += 1
2727
except Exception as e:
2828
print(e)
@@ -31,9 +31,9 @@
3131
logs.close()
3232
address = None
3333
phone = None
34+
region = None
3435

35-
detail = f"{title}\n{address}\n{phone}"
36-
print(region)
36+
detail = f"{title}\n{address}\n{phone}\n{region}"
3737
# print(detail)
3838

3939
try:

0 commit comments

Comments
 (0)