Notice
Recent Posts
Recent Comments
Link
목록crawler (1)
아미(아름다운미소)
[python]crawler 샘플
# encoding: utf-8 import codecs from collections import deque import urllib2, urlparse import socket from BeautifulSoup import BeautifulSoup def get_links(uri, startswith=""): """Returns list of referenced URIs (without duplicates) found in the document returned for the input URI""" results = set() try: page = urllib2.urlopen(uri) soup = BeautifulSoup(page) for link in soup.findAll('a'): # try: ..
랭귀지/python
2017. 12. 21. 18:30