Skip to content

Commit 871b257

Browse files
committed
print region of address
1 parent 16405fe commit 871b257

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

writing_clean_data.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
try:
2121
title = biz.find('a', {'class': 'biz-name'}).text
2222
address = biz.find('address').contents
23-
print(address)
23+
# print(address)
2424
phone = biz.find('span', {'class': 'biz-phone'}).text
25+
region = soup.find('span', {'class': 'neighborhood-str-list'}).contents
2526
count += 1
2627
except Exception as e:
2728
print(e)
@@ -32,7 +33,8 @@
3233
phone = None
3334

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

3739
try:
3840
textFile.write(str(detail) + '\n\n')

0 commit comments

Comments
 (0)