api를 사용하다가 이상한 게 발견 되었다.
FLAC stands for "Free Lossless Audio Condenser"'
정상적으로 출력되야하는 문장일텐데 html entity가 발견된 것이다.
이것을 어떻게 없애는지 궁금해서 찾아보니 매우 단순했다.
html module을 import 해서 unescape를 해주면 된다.
import html
html.unescape("FLAC stands for "Free Lossless Audio Condenser"'")'조열심 카테고리 > Python 이것저것' 카테고리의 다른 글
| [Python] dictionary랑 if문 잘 쓰기 (0) | 2022.06.04 |
|---|---|
| [Python] 해외 주식 관련 기사 문자 알림 프로그램 (0) | 2022.05.30 |
| [Python] Otaku-qutoes program (0) | 2022.05.23 |
| [Python] smtplib과 datetime을 이용하여 생일 관련 템플릿 메일 보내기 (0) | 2022.05.23 |
| [Python] SMTP (0) | 2022.05.23 |