access log 파일이나 한글 URL경로를 보면 한글이 유니코드로 표기되어 있다. python으로 이를 한글로 쉽게 변환이
가능하다.
from urllib.parse import unquote_plus
site = '.com/%EA%B3%A0%EB%93%B1-%EC%98%81%EC%96%B4'
searchword = unquote_plus(site, encoding='utf-8', errors='replace')
print(searchword)
-------------------------------------------------------------------
.com/고등-영어
'Python > Python Programming' 카테고리의 다른 글
[Python] max, min, sum 내장함수 (0) | 2019.08.24 |
---|---|
[Python] Send Slack Massages and upload file (0) | 2019.08.02 |
jupyter notebook install (windows) 설치 (0) | 2019.07.27 |
[Python] 로그스탬프 UTC 한국시간 계산하기 (0) | 2019.07.02 |
[Python] datetime.strftime를 이용한 날짜와 시간 변환 (0) | 2019.04.11 |
파이썬(Python) 설치 (1) | 2019.03.17 |
[Python] ODBC driver를 이용한 mssql 연결 (0) | 2018.12.29 |
[Python] File Copy (파일복사) (0) | 2018.09.03 |