인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

김은준's profile image
김은준

asked

Python Web Crawling & Automation to Do My Work (feat. Stock, Real Estate Data / Instagram)

5.2 Daily stock price data part2 - bs4

일별 시세 데이터 상승/하락 \t\n해결법

Written on

·

68

·

Edited

0

image.pngimage.png

 

 

사진과 같이 등락률에 상승 \n\t\t\ 이런 결과값이 나오는데 왜이런가요?

python웹-크롤링

Answer 1

0

DeepingSauce님의 프로필 이미지
DeepingSauce
Instructor

이건 page 를 parsing하면서 페이지 구조 등으로 인해 text에 딸려있는 line break 등이 같이 딸려온겁니다.

[d.strip() for d in my_list] 으로 해결가능합니다

김은준's profile image
김은준

asked

Ask a question