from urllib.request import urlopen
from urllib.parse import quote
korean_wikipedia = "https://ko.wikipedia.org/wiki/" + quote("한국어 위키백과")
urlopen(korean_wikipedia)
출처: https://stackoverflow.com/questions/4389572/how-to-fetch-a-non-ascii-url-with-urlopen
'매번 찾기 귀찮아서 모아두는 개발팁' 카테고리의 다른 글
[Python/csv] csv writer로 출력 시 개행문자가 두 개 출력되는 경우 (0) | 2023.05.03 |
---|---|
[Python] jsonl 파일 읽고 쓰기 (1) | 2023.03.15 |
[Python] 예외처리 (0) | 2023.03.02 |
[Python/Pandas] 다중 조건으로 데이터 행 추출하기(indexing with multidimensional key) (0) | 2023.03.02 |
[Python] 특수문자 제거 (0) | 2023.01.31 |