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 be3394a

Browse files
assign cleaned address and region
1 parent c6ad062 commit be3394a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎writing_clean_data.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@
2424
phone = biz.find('span', {'class': 'biz-phone'}).text
2525
region = biz.find('span', {'class': 'neighborhood-str-list'}).contents
2626
count += 1
27+
first_line = ""
28+
second_line = ""
2729
for item in address:
2830
if "br" in item:
29-
print(item.getText())
31+
first_line+=item.getText()+" "
3032
else:
31-
print('\n'+ item.strip(" \n\r\t"))
33+
second_line+= item.strip(" \n\r\t")+" "
3234
for item in region:
3335
if "br" in item:
34-
print(item.getText())
36+
first_line+=item.getText()+" "
3537
else:
36-
print(item.strip(" \n\t\r") + '\n')
38+
second_line+=item.strip(" \n\t\r") + " "
3739

3840
except Exception as e:
3941
print(e)

0 commit comments

Comments
(0)

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