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
# -*- coding: utf-8 -*- | |
import requests | |
import re | |
from bs4 import BeautifulSoup | |
def fetch_page(url): | |
r = requests.get(url) | |
return r.text |
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
# -*- coding: utf8 -*- | |
from __future__ import unicode_literals | |
try: | |
from urllib.request import urlopen | |
except ImportError: | |
from urllib import urlopen | |
import re | |
from bs4 import BeautifulSoup | |
html = urlopen('http://www.booksaetong.co.kr/shop/list.php?ca_id=60&gdate=2015-04-10').read() |