python 爬虫 定向爬取技术
# -*- coding: utf-8 -*-
import re
import urllib.request
def getcontent(url):
#更改自己的User-Agent,让所爬取网页以为自己是浏览器访问
headers = ("User-Agent","Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ...
原创
2018-10-18 21:59:47 ·
259 阅读 ·
0 评论