Created
June 11, 2016 08:35
-
-
Save sujinleeme/a60031c113d1301d7d8fba0f1b65f046 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# beautiful Soup 한국어 인코딩 문제 | |
# -*- coding: utf-8 -*- | |
import sys | |
import urllib.request | |
import re | |
from bs4 import BeautifulSoup | |
content = urllib.request.urlopen("http://www.roadrun.co.kr/schedule/view.php?no=6198") | |
soup = BeautifulSoup(content.read().decode('euc-kr', 'ignore'), 'html.parser') | |
print(soup) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment