简单爬虫直接diy, 复杂的用scrapy
import urllib2
import re
from bs4 import BeautifulSoap req = urllib2.Request(url, headers={'User-Agent' : "Magic Browser"}) webpage= urllib2.urlopen(req) soap = BeautifulSoap(webpage.read())
...
2023-10-08 18:55:16
简单爬虫直接diy, 复杂的用scrapy
import urllib2
import re
from bs4 import BeautifulSoap req = urllib2.Request(url, headers={'User-Agent' : "Magic Browser"}) webpage= urllib2.urlopen(req) soap = BeautifulSoap(webpage.read())
...
下一篇:Python简单爬虫入门一