|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
import re
import scrapy
import requests
from Spider_Object_Test.items import InsuranceItem
class jycghubei_Zb_Spider(scrapy.Spider):
name = 'jycghubei_zb'
allowed_domains = ['jycg.hubei.gov.cn']
start_urls = ['http://jycg.hubei.gov.cn/jyxx/zfcg/cggg/']
def start_requests(self):
for u in self.start_urls:
yield scrapy.Request('http://jycg.hubei.gov.cn/jyxx/zfcg/cggg/')
def parse(self, response):
print(response)
-------------------------------------------------------------
大家可以试一下这个网站,我用下面的get请求,返回 <Response [412]>
有没有哪位大神遇到过这个状态码的 怎么解决???
resp = requests.get('http://jycg.hubei.gov.cn/jyxx/zfcg/cggg/')
print(resp) |
|