Request对象

Request对象在我们写爬虫 爬取一页的数据需要重新发送一个请求的时候调用

其中比较常用的参数有:

  1. url:这个request对象发送请求的url
  2. callback:在下载器下载完相应的数据后执行的回调函数
  3. method:请求方式,默认为GET,可以设置为其他方式
  4. headers:请求头,对于一些固定的设置,放在settings.py中指定即可。对于那些非固定的,可以在发送请求的时候指定
  5. meta:比较常用,用于在不同的请求之间传递数据
  6. encoding:编码,默认为utf-8,使用默认即可
  7. dot_filter:表示不由调速器过滤,在执行多次重复的请求时 用的比较多
  8. errback:在发生错误的时候执行的函数

Response对象:

Response对象一般是由scrapy自动构建的,因此开发者不需要关心如何创建Response对象,而是如何使用它

Response对象有很多属性,可以用来提取数据的,主要有以下属性:

  1. meta:从其他请求传过来的meta属性,可以用来保持多个请求之间的数据连接
  2. encoding:返回当前字符串编码和解码的格式
  3. text:将返回来的数据作为unicode字符串返回
  4. body:将返回来的数据作为bytes宇符串返回
  5. xpath:xpath选择器
  6. css:css选择器

发送get、post请求

在请求数据的时候如果想要发送post请求,推荐使用FormRequest对象,FormRequest继承Request,可以方便的指定表单数据

如果在爬虫一开始的时候就需要发送post请求,需要在爬虫类中重写start_requests(self)方法,在这个方法中发送post请求,程序会最先开始执行这个方法,并且不再调用start_urls里的url

模拟登陆人人网

创建爬虫

scrapy startproject renren
cd renren
scrapy gensipder renren_login "renren.com"

修改settings.py代码

爬虫部分代码

 # -*- coding: utf-8 -*-
import scrapy'''
登录人人网,访问大鹏页面   post、get请求
'''class RenrenLoginSpider(scrapy.Spider):name = 'renren_login'allowed_domains = ['renren.com']start_urls = ['http://renren.com/']def start_requests(self):# 重写start_requests(self)方法,发送post请求,重写后就不是最先访问start_urls里的url了data = {'email': '账号','password': '密码'}login_url = 'http://www.renren.com/PLogin.do'  # 这个接口没有加密什么的 直接账号密码提交过去就行了request = scrapy.FormRequest(login_url, formdata=data, callback=self.parse_page)yield request# 使用scrapy.FormRequest发送post请求:传入url 参数 回调函数,最后把返回结果传递给回调函数# 返回结果一般都在response(响应)参数里def parse_page(self, response):    # 访问大鹏主页request = scrapy.Request(url='http://www.renren.com/880151247/profile', callback=self.parse_profile)yield request# 使用scrapy.Request发送get请求:传入url 回调函数,最后把返回结果传递给回调函数def parse_profile(self, response):  # 把大鹏主页HTML代码写到文件里with open('response.html', 'w', encoding='utf-8') as f:f.write(response.text)

由于只是提交get、post请求,无需获取数据,items.py和pipelines.py不用设置什么

模拟登录豆瓣网(识别验证码)

创建爬虫

scrapy startproject douban
cd douban
scrapy gensipder douban_login "www.douban.com"

修改settings.py代码

和人人网一样,设置ROBOTSTXT_OBEY = False、DEFAULT_REQUEST_HEADERS即可

爬虫部分代码

# -*- coding: utf-8 -*-
import scrapy
from urllib import request
from PIL import Image'''
登录豆瓣,修改个性签名   post  get请求
'''class DoubanLoginSpider(scrapy.Spider):name = 'douban_login'allowed_domains = ['www.douban.com']start_urls = ['https://accounts.douban.com/login']# 登录页面的url,模块会最先访问到登录页面,然后把返回结果传给函数parselogin_url = 'https://www.douban.com/login'   # 提交post登录的urlprofile_url = 'https://www.douban.com/people/akajiuren/'  # 访问个人中心的urldef parse(self, response):     # 登录豆瓣formdata = {'source': 'None','redir': 'https://www.douban.com','form_email': '账号','form_password': '密码','remember': 'on','login': '登录'}captcha_url = response.css('img#captcha_image::attr(src)').get()# 使用css获取带有captcha_image属性的img标签的src属性(图片验证码url),attr()是获取属性# response是Scrapy在访问上面start_urls时返回的结果(登陆页面)if captcha_url:   # 如果登录页面有图片验证码的url,说明登录的时候需要图片验证码captcha = self.regonize_captcha(captcha_url)  # 调用手动输入图片验证码的函数# 把获取到的图片验证码和captcha-id这两个参数加入到formdataformdata['captcha-solution'] = captchaformdata['captcha-id'] = response.xpath('//input[@name="captcha-id"]/@value').get()# 发送post登录请求,将结果传给函数parse_after_loginyield scrapy.FormRequest(url=self.login_url, formdata=formdata, callback=self.parse_after_login)def regonize_captcha(self, image_url):  # 手动输入图片验证码request.urlretrieve(image_url, 'captcha.png')image = Image.open('captcha.png')   # 用Image模块打开验证码image.show()                        # show方法可以把验证码展示出来(电脑看图工具方式打开)captcha = input('请输入图片验证码:')return captcha                      # 最终返回输入的验证码def parse_after_login(self, response):   # 判断是否登录成功if response.url == 'https://www.douban.com':  # 登录成会跳转到豆瓣首页的url上,所以以此来判断yield scrapy.Request(url=self.profile_url, callback=self.parse_profile)# 登录成功的话就访问到个人中心,将结果传给函数parse_profile来执行修改签名操作print('登录成功')else:print('登录失败')def parse_profile(self, response):  # 修改个性签名if response.url == self.profile_url:  # 判断当前页面是否在个人中心print('进入个人中心,修改个性签名', response.url)url = 'https://www.douban.com/j/people/akajiuren/edit_signature'ck = response.xpath('//input[@name="ck"]/@value').get()  # 从个人中心页面取出ck值formdata = {'ck': ck,'signature': '我是软件'}# 构造url和参数,发送post数据来修改个性签名yield scrapy.FormRequest(url, formdata=formdata, callback=self.parse_none)# 这里只是修改个性签名,后面不做其他操作了,所以这里的callback给一个空的函数# 不指定callback的话会继续执行parse函数,等于重新跑一遍了,这个时候程序会从当前页面(个人中心的页面) 去执行获取图片验证码和登录的一系列操作,那么肯定会出现错误print('修改个性签名成功')else:print('修改个性签名失败:“没有成功进入个人中心页面”')def parse_none(self, response):pass

对接阿里云图片验证码识别api,自动识别豆瓣图片验证码

人人网:response.html:

<!Doctype html>
<html class="nx-main860">
<head><meta name="Description" content="人人网 校内是一个真实的社交网络,联络你和你周围的朋友。 加入人人网校内你可以:联络朋友,了解他们的最新动态;和朋友分享相片、音乐和电影;找到老同学,结识新朋友;用照片和日志记录生活,展示自我。"/><meta name="Keywords" content="Xiaonei,Renren,校内,大学,同学,同事,白领,个人主页,博客,相册,群组,社区,交友,聊天,音乐,视频,校园,人人,人人网"/><title>人人网 - 大鹏董成鹏</title><meta charset="utf-8"/>
<link rel="shortcut icon" type="image/x-icon" href="http://a.xnimg.cn/favicon-rr.ico?ver=3" />
<link rel="apple-touch-icon" href="http://a.xnimg.cn/wap/apple_icon_.png" />
<link rel="stylesheet" type="text/css" href="http://s.xnimg.cn/a86614/nx/core/base.css">
<script type="text/javascript">
if(typeof nx === 'undefined'){var nx = {};
}
nx.log = {startTime : + new Date()
};
nx.user = {id : "430868656",
ruid:"430868656",
tinyPic : "http://head.xiaonei.com/photos/0/0/men_tiny.gif ",
name : "新用户80620",
privacy: "99",
requestToken : '-1456040411',
_rtk : '74f7947f'
};nx.user.isvip = false;nx.user.hidead = false;nx.webpager = nx.webpager || {};
nx.production = true;
</script>
<script type="text/javascript" src="http://s.xnimg.cn/a83151/nx/core/libs.js"></script>
<script type="text/javascript">
define.config({map:{"backbone":"http://s.xnimg.cn/a75208/nx/core/backbone.js",
"ui/draggable":"http://s.xnimg.cn/a70750/nx/core/ui/draggable.js",
"ui/menu":"http://s.xnimg.cn/a70736/nx/core/ui/menu.js",
"ui/resizable":"http://s.xnimg.cn/a70738/nx/core/ui/resizable.js",
"ui/sortable":"http://s.xnimg.cn/a70749/nx/core/ui/sortable.js",
"ui/tabs":"http://s.xnimg.cn/a78333/nx/core/ui/tabs.js",
"ui/ceiling":"http://s.xnimg.cn/a76297/nx/core/ui/ceiling.js",
"ui/columns":"http://s.xnimg.cn/a68070/nx/core/ui/columns.js",
"ui/dialog":"http://s.xnimg.cn/a76395/nx/core/ui/dialog.js",
"ui/fileupload":"http://s.xnimg.cn/a81310/nx/core/ui/fileupload.js",
"ui/pagination":"http://s.xnimg.cn/a70307/nx/core/ui/pagination.js",
"ui/placeholder":"http://s.xnimg.cn/a79685/nx/core/ui/placeholder.js",
"ui/progressbar":"http://s.xnimg.cn/a62964/nx/core/ui/progressbar.js",
"ui/rows":"http://s.xnimg.cn/a62964/nx/core/ui/rows.js",
"ui/scroll":"http://s.xnimg.cn/a61518/nx/core/ui/scroll.js",
"ui/scrollbar":"http://s.xnimg.cn/a76868/nx/core/ui/scrollbar.js",
"ui/select":"http://s.xnimg.cn/a82096/nx/core/ui/select.js",
"ui/slideshow":"http://s.xnimg.cn/a72804/nx/core/ui/slideshow.js",
"ui/speech":"http://s.xnimg.cn/a77631/nx/core/ui/speech.js",
"ui/textbox":"http://s.xnimg.cn/a79526/nx/core/ui/textbox.js",
"ui/renren/textbox":"http://s.xnimg.cn/a92727/nx/core/ui/renren/textbox.js",
"ui/tooltip":"http://s.xnimg.cn/a73228/nx/core/ui/tooltip.js",
"ui/renren/addfriend":"http://s.xnimg.cn/a78457/nx/core/ui/renren/addFriendLayer.js",
"ui/renren/at":"http://s.xnimg.cn/a78409/nx/core/ui/renren/atAndEmotion.js",
"ui/renren/emotion":"http://s.xnimg.cn/a78409/nx/core/ui/renren/atAndEmotion.js",
"ui/renren/commentCenter":"http://s.xnimg.cn/a83569/nx/core/ui/renren/commentCenter.js",
"ui/renren/friendgroup":"http://s.xnimg.cn/a62964/nx/core/ui/renren/friendGroup.js",
"ui/renren/friendListSelector":"http://s.xnimg.cn/a78513/nx/core/ui/renren/friendListSelector.js",
"ui/renren/like":"http://s.xnimg.cn/a83569/nx/core/ui/renren/like.js",
"nx/namecard":"http://s.xnimg.cn/a77668/nx/core/ui/renren/namecard.js",
"ui/renren/pagelayer":"http://s.xnimg.cn/a62964/nx/core/ui/renren/pageLayer.js",
"ui/renren/photoupload":"http://s.xnimg.cn/a82833/nx/core/ui/renren/photoupload.js",
"ui/renren/privacy":"http://s.xnimg.cn/a76680/nx/core/ui/renren/privacy.js",
"ui/renren/share":"http://s.xnimg.cn/a78999/nx/core/ui/renren/share.js",
"ui/renren/vocal":"http://s.xnimg.cn/a77347/nx/core/ui/renren/vocal.js",
"ui/renren/mvideo":"http://s.xnimg.cn/a80641/nx/core/ui/renren/mvideo.js",
"ui/renren/with":"http://s.xnimg.cn/a82994/nx/core/ui/renren/with.js",
"ui/clipboard":"http://s.xnimg.cn/a63417/nx/core/ui/clipboard.js",
"app/publisher":"http://s.xnimg.cn/a91505/nx/core/app/publisher.js",
"viewer":"http://s.xnimg.cn/a83025/nx/photo/viewer/js/viewer.js",
"media/player": "http://s.xnimg.cn/nx/photo/viewer/js/mediaplayer.js",
"ui/renren/like/commentseed":"http://s.xnimg.cn/a64636/nx/core/ui/renren/like.seed.comment.js",
"ui/renren/like/seed":"http://s.xnimg.cn/a62964/nx/core/ui/renren/like.seed.js",
"ui/renren/share/seed":"http://s.xnimg.cn/a62964/nx/core/ui/renren/share.seed.js",
"ui/renren/follow":"http://s.xnimg.cn/a78456/nx/core/ui/renren/follow.js",
"ui/renren/relationFollow":"http://s.xnimg.cn/a78457/nx/core/ui/renren/relationFollow.js",
"ui/autocomplete":"http://s.xnimg.cn/a70736/nx/core/ui/autocomplete.js",
"ui/showCommonFriend":"http://s.xnimg.cn/a78917/nx/core/ui/renren/showcommonfriend.js",
"photo/circler":"http://s.xnimg.cn/a73344/nx/photo/phototerminal/js/circler.js",
"ui/friendSearch":"http://s.xnimg.cn/a64338/nx/core/ui/renren/friendSearch.js",
"ui/renren/replyOption":"http://s.xnimg.cn/a68256/nx/core/ui/renren/replyOption.js",
"photo/avatarUpload": "http://s.xnimg.cn/a77340/nx/photo/upload-avata/js/avatarUpload.js",
"ui/renren/school":"http://s.xnimg.cn/a85689/nx/core/ui/renren/school.js"
}});
nx.data.isDoubleFeed = Boolean();
nx.data.isDoubleFeedGuide = Boolean();
</script>
<script type="text/javascript" src="http://s.xnimg.cn/a88603/nx/core/base.js"></script>
<!--[if lt IE 9]>
<script type="text/javascript">
document.execCommand("BackgroundImageCache", false, true);
</script>
<![endif]--><script type="text/javascript">console.log('tiemline_v7.jsp');nx.webpager.fold = true;nx.user.pageid = 'profile';</script><script type="text/javascript">window._developer_no_webpager = true;</script><script>XN = {get_check:'-1456040411',get_check_x:'74f7947f',env:{domain:'renren.com',shortSiteName:'人人',siteName:'人人网'}};</script>
<link href="http://s.xnimg.cn/a72965/n/core/global2-all-min.css" rel="stylesheet" />
<script src="http://s.xnimg.cn/a72842/n/core/base-all2.js"></script>
<script>
XN.getFileVersion([
'http://s.xnimg.cn/a19816/csspro/apps/profile.css',
'http://s.xnimg.cn/a54265/csspro/module/friendSelector.css',
'http://s.xnimg.cn/a16298/csspro/module/status-pop.css',
'http://s.xnimg.cn/a58689/csspro/module/school-selector.css',
'http://s.xnimg.cn/a64379/csspro/module/minieditor.css',
'http://s.xnimg.cn/a20457/jspro/xn.app.recommendFriend.js',
'http://s.xnimg.cn/a63482/jspro/xn.app.status.js',
'http://s.xnimg.cn/a69051/jspro/xn.app.share.js',
'http://s.xnimg.cn/a64158/jspro/xn.app.ilike.js',
'http://s.xnimg.cn/a58863/jspro/xn.ui.pager.js',
'http://s.xnimg.cn/a32035/jspro/xn.ui.multiFriendSelectorBox.js',
'http://s.xnimg.cn/a57199/jspro/xn.app.friend.group.js',
'http://s.xnimg.cn/a72369/jspro/lib/mediaplayer.js',
'http://s.xnimg.cn/a64992/jspro/xn.ui.schoolSelectors.js',
'http://s.xnimg.cn/a13200/jspro/album/ZeroClipboard.js',
'http://s.xnimg.cn/a66084/jspro/xn.ui.emoticons.js',
'http://s.xnimg.cn/a30963/n/apps/home/modules/drag-upload/drag-upload.js',
'http://a.xnimg.cn/n/core/modules/flashUploader/flashUploader.js',
'http://s.xnimg.cn/a33832/n/core/modules/flashUploader/upload-pop-all-min.css',
'http://s.xnimg.cn/a66726/n/core/feed/video/video-show.js'
]);
XN.namespace( 'user' );
XN.$extend(XN.user, {'id':'430868656',
'ruid':'430868656',
'tinyPic':'http://head.xiaonei.com/photos/0/0/men_tiny.gif',
'name':"%E6%96%B0%E7%94%A8%E6%88%B780620",
'pageVersion':6
});
</script>
<link rel="stylesheet" type="text/css" href="http://s.xnimg.cn/a84113/apps/profile2/profile-all-min.css" />
<link rel="stylesheet" type="text/css" href="http://s.xnimg.cn/a62931/modules/global-publisher/products/profile/publisher-all-min.css" />
<link rel="stylesheet" type="text/css" href="http://s.xnimg.cn/a79828/nx/timeline/profile.css" /><script type="text/javascript" data-src="http://s.xnimg.cn/a84115/n/core/modules/ilike/index.js" data-module="xn/ilike"></script>
<script type="text/javascript">
var CoverInfo = {uid: '880151247',
profileid: '430868656',
coverScale: '0.0',
coverAddress: '',
albumid: '0',
photoid: '0',
uploadCoverMd5String: 'ca53454ff28ef3eb79a5eb0e890e19f8'
};
var profileOwnerId = '880151247';
var profileOwnerName = '大鹏董成鹏';
var uid = '430868656';
var uname = '新用户80620';
var highlightIds = [];
var highlightNums = [];
var tlNavData = '[{"year":2016,"month":[4,3,2,1]},{"year":2015,"month":[12,11,10,9,8,7]}]';
var birthYear = '1982';
var birthMonth = '1';
var birthDay = '12';
var profileNowYear = '2018';
var profileNowMonth = '12';
var profileNowDay = '2';
if(XN) XN.pageId = 'profile';  // 照片弹層
var isInWhiteList = true; // 是否在百名单内
var isStar = 0; //是否是星级用户
var superAdmin = false; //超级管理员
var friend_type = '5'; //好友状态
var lastdayGuide = false; //末日引导下线
var isUseSkin = false;
var timelineV7 = true;
</script>
<script type="text/javascript" src="http://s.xnimg.cn/a53261/jspro/xn.app.gossip.js"></script>
<script type="text/javascript" src="http://s.xnimg.cn/a53030/jspro/xn.ui.minieditor.js"></script>
<script src="http://s.xnimg.cn/a90984/apps/profile2/combine/profile-v7.js"></script>
<script src="http://s.xnimg.cn/a90985/nx/timeline/profile-v7.js"></script>
<script type="text/javascript" src="http://s.xnimg.cn/a60989/n/apps/photo/modules/flashUploaderAndSend/friendSelector.js"></script>
<script data-src="http://s.xnimg.cn/a50466/apps/profile2/module/lifeevent/tplCreate.js" data-module="xn/profile/tplcreate"></script>
<script data-src="http://s.xnimg.cn/a49432/apps/profile2/module/lifeevent/tplEdit.js" data-module="xn/profile/tpledit"></script>
<link rel="stylesheet" type="text/css" href="http://s.xnimg.cn/a58377/jspro/privacy/style/index-all-min.css" media="all" />
<script type="text/javascript">
object.predefine('friendsSelector', 'http://s.xnimg.cn/a74102/jspro/xn.app.friendsSelector.js');
object.predefine('privacy', 'http://s.xnimg.cn/a73997/jspro/xn.app.privacy.js');
object.predefine('xn/feed/videoShow', 'http://s.xnimg.cn/a66726/n/core/feed/video/video-show.js');window.IS_PRIVACY_ON = true;</script><!-- 弹框样式 --><style>.toast{position: fixed;/*height: 100px;*/background: rgba(0,0,0,.8);padding:10px 30px;border-radius: 6px;z-index: 10001;width: 300px;top:50%;left: 50%;-webkit-transform:translate3d(-50%,-50%,0);line-height:  50px;text-align: center;font-size: 24px;color: #fff;}</style>
</head>
<body><div id="zidou_music"></div>
<style>#ZDMusicPlayer{left:80px;}</style><div id="nxContainer" class="nx-container nx-narrowViewport vip-skin-profile"><div class="nx-main"><div id="zidou_template" style="display:none"></div> <div id="hometpl_style" data-notshow="1" style="display:none"><br /><style></style></div><div id="nxHeader" class="hd-wraper "><div class="hd-fixed-wraper clearfix"><div class="hd-main"><h1 class="hd-logo"><a href="http://www.renren.com/" title="人人网 renren.com - 人人网校内是一个真实的社交网络,联系朋友,一起玩游戏">人人网</a></h1><div class="hd-nav clearfix"><div class="hd-search"><input type="text" id="hd-search" class="hd-search-input" placeholder="搜索好友,公共主页,状态" /><a href="javascript:;" class="hd-search-btn"></a></div><dl class="hd-account clearfix"><dt><a href="http://www.renren.com/430868656/profile"><img class="hd-avatar" width="30" height="30" src="http://head.xiaonei.com/photos/0/0/men_tiny.gif" alt="新用户80620" /></a></dt><dd><a class="hd-name" href="http://www.renren.com/430868656/profile" title="新用户80620">新用户8..</a><a id="hdLoginDays" target="_blank" class="hd-logindays" href="http://sc.renren.com/scores/mycalendar" data-tips="{'days':'1','range':'2','score':'35','vipLevel':'1'}">1天</a></dd></dl><div class="hd-account-action"><a href="#" class="account-more"><span class="ui-icon ui-icon-setting ui-iconfont"></span></a><div class="nx-drop-box nx-simple-drop nx-account-drop"><ul class="nv-account-ctrl clearfix"><li class="nv-drop-privacy "><a href="http://www.renren.com/privacyhome.do"><span class="ui-icon ui-icon-lock ui-iconfont"></span>隐私设置</a></li><li class="nv-drop-setting"><a href="http://safe.renren.com/"><span class="ui-icon ui-icon-privacysetting ui-iconfont"></span>个人设置</a></li><li class="nv-drop-pay"><a href="http://pay.renren.com/"><span class="ui-icon ui-icon-pay"></span>充值中心</a></li><li class="nv-account-sline"></li><li class="nv-drop-guide"><a href="http://2014.renren.com/v7/guide"><span class="ui-icon ui-icon-guide ui-iconfont"></span>新版指南</a></li><li class="nv-drop-contact"><a href="http://help.renren.com/helpcenter"><span class="ui-icon ui-icon-customerservice ui-iconfont"></span>联系客服</a></li><li class="nv-drop-exit"><a href="http://www.renren.com/Logout.do?requesttoken=-1456040411"><span class="ui-icon ui-icon-out ui-iconfont"></span>退出</a></li></ul></div></div><div class="hd-account-action hd-account-action-vip"><a href="#" class="account-more"><span class="ui-icon ui-iconfont ui-icon-crown "></span></a><div class="nx-drop-box nx-simple-drop nx-account-drop"><ul class="nv-account-ctrl clearfix"><li class="nv-drop-recharge"><a href="http://i.renren.com/pay/pre?wc=huangguan"><span class="ui-icon ui-icon-money ui-iconfont"></span>会员</a></li><li class="nv-drop-contact"><a href="http://i.renren.com/index/yearpay/home"><span class="ui-icon ui-icon-calendar ui-iconfont"></span>年付会员</a></li><li class="nv-drop-vip"><a href="http://i.renren.com/"><span class="ui-icon ui-icon-crown ui-iconfont"></span>VIP中心</a></li><li class="nv-account-sline"></li><li class="nv-drop-skin"><a href="http://i.renren.com/store/index/home?wc=huangguan"><span class="ui-icon ui-icon-artist ui-iconfont"></span>装扮商城</a></li><li class="nv-drop-skin"><a href="http://gift.renren.com?wc=huangguan"><span class="ui-icon ui-icon-gift ui-iconfont"></span>礼物中心</a></li></ul></div></div></div></div></div></div><div class="nx-wraper clearfix"><div class="nx-sidebar"><div id="nxSlidebar" class="slide-fixed-wraper clearfix"><div class="app-nav-wrap"><div class="app-nav-cont"><ul class="app-nav-list"><li class="app-nav-item app-feed" data-tip="首页"><a class="app-link" href="http://www.renren.com/"><img class="app-icon" width="32" height="32" src="http://a.xnimg.cn/a.gif"  /><span class="app-title">首页</span></a></li><li class="app-nav-item app-live" data-tip="人人直播"><a class="app-link" href="http://zhibo.renren.com/"><img class="app-icon" width="32" height="32" style="background:none;" src="http://a.xnimg.cn/nx/core/theme/skin/mainframe/icon-live.png" /><span class="app-title">人人直播</span></a></li><li class="app-nav-item app-matter" data-tip="与我相关"><a class="app-link" href="http://matter.renren.com/"><img class="app-icon" width="32" height="32" src="http://a.xnimg.cn/a.gif" /><span class="app-title">与我相关</span></a></li><li class="app-nav-item app-nav-item-cur app-homepage" data-tip="个人主页"><a class="app-link" href="http://www.renren.com/430868656/profile"><img class="app-icon" width="32" height="32" src="http://a.xnimg.cn/a.gif" /><span class="app-title">个人主页</span></a></li><li class="app-nav-item app-album" data-tip="我的相册"><a class="app-link" href="http://photo.renren.com/photo/430868656/albumlist/v7"><img class="app-icon" width="32" height="32" src="http://a.xnimg.cn/a.gif" /><span class="app-title">我的相册</span></a></li><li class="app-nav-item app-friends" data-tip="好友"><a class="app-link" href="http://friend.renren.com/managefriends"><img class="app-icon" width="32" height="32" src="http://a.xnimg.cn/a.gif" /><span class="app-title">好友</span></a></li><li class="app-nav-item app-st" data-tip="人人分期"><a class="app-link" href="http://xray.jebe.renren.com/xray/monitor/click.htm?clickUrl=http://fenqi.renren.com/?origin=587&adzoneID=fenqi&creativeID=0&userID=0" target="_blank"><img class="app-icon" width="32" height="32" style="background:none;" src="http://a.xnimg.cn/nx/core/theme/skin/mainframe/icon-fq.png"><span class="app-title">人人分期</span></a></li><li class="app-nav-item app-share" data-tip="热门"><a class="app-link" href="http://share.renren.com/share/hot/v7"><img class="app-icon" width="32" height="32" src="http://a.xnimg.cn/a.gif" /><span class="app-title">热门</span></a></li><li class="app-nav-item app-myapp"  data-tip="应用中心"><a class="app-link" href="http://app.renren.com/?origin=54171"><img class="app-icon" width="32" height="32" style="background:none;" src="http://a.xnimg.cn/nx/core/theme/skin/mainframe/icon-app201412.png" /><span class="app-title">应用中心</span></a></li><li class="app-nav-item app-more" data-tip="我的应用"><a class="app-link" href="http://app.renren.com/app/editApps?origin=44070"><span class="icon-wrap"><img class="app-icon" width="32" height="32" style="background:none;" src="http://a.xnimg.cn/nx/core/theme/skin/mainframe/icon-myapp201412b.png" alt="我的应用" /></span><span class="app-title">我的应用</span></a></li><li class="app-nav-item app-recruit" data-tip="校园招聘"><a class="app-link" href="http://trace.51job.com/trace.php?adsnum=793519&ajp=aHR0cDovL3JlbnJlbi41MWpvYi5jb20=&k=475b26097b456b4c2c5d5f9864c0d69d"><span class="icon-wrap"><img class="app-icon" width="32" height="32" style="background:none;" src="http://a.xnimg.cn/nx/hr/images/51job.jpg"/></span><span class="app-title">校园招聘</span></a></li></ul></div></ul></div><div class="app-nav-cont recent-app-cont"><ul class="app-nav-list"><li class="app-nav-item"><div class="side-item-advert app-promote-ad" data-adzone-id="100000000119"></div></li><li class="app-nav-item" data-tip="国战魏蜀吴"><a class="app-link" href="http://apps.renren.com/guozhanweishuwu?origin=50081"  target="_blank"><span class="icon-wrap"><img class="app-icon" width="32" height="32" src="http://app.xnimg.cn/application/logo48/20160622/15/40/LcuGV58c020051.jpg" alt="国战魏蜀吴" /></span><span class="app-title">国战魏蜀吴</span><span class="app-icon-small"><img src="http://s.xnimg.cn/n/apps/profile/modules/tuiguang/2014.3.30.type2.v2.png" /></span></a></li><li class="app-nav-item" data-tip="德克萨斯扑"><a class="app-link" href="http://apps.renren.com/boyaa_texas/?origin=50082"  target="_blank"><span class="icon-wrap"><img class="app-icon" width="32" height="32" src="http://app.xnimg.cn/application/logo48/20111213/11/45/LmVMZ525d018153.jpg" alt="德克萨斯扑" /></span><span class="app-title">德克萨斯扑</span></a></li></ul></div></div></div></div><div class="bd-container "><div class="frame-nav-wrap">
<div id="frameFixedNav" class="frame-nav-fixed-wraper">
<div class="frame-nav-inner">
<ul class="fd-nav-list clearfix">
<li class="fd-nav-item"><span class="fd-nav-icon fd-sub-nav"></span>
<a href="http://www.renren.com/880151247/profile">大鹏董成鹏</a></li>
<li class="fd-nav-item">
<a href="http://www.renren.com/880151247/profile?v=info_timeline">资料</a>
</li>
<li class="fd-nav-item">
<a href="http://photo.renren.com/photo/880151247/albumlist/v7">相册</a>
</li>
<li class="fd-nav-item">
<a href="http://share.renren.com/share/v7/880151247">分享</a>
</li>
<li class="fd-nav-item">
<a href="http://status.renren.com/status/v7/880151247">状态</a>
</li>
<li class="fd-nav-item"><a href="http://blog.renren.com/blog/430868656/blogs/880151247">日志</a></li>
<li class="fd-nav-item"><a href="http://friend.renren.com/otherfriends?id=880151247">好友</a>
</li>
<li class="fd-nav-item fd-nav-showmore">
<a href="#">更多<em class="fd-arr-down"><span class="fd-arr-outer"><span class="fd-arr-inner"></span></span></em></a>
<div class="nf-group-list-container">
<ul class="nf-group-list">
<li class="nf-group-item">
<a href="http://follow.renren.com/list/880151247/sub/v7">关注</a>
</li>
<li class="nf-group-item">
<a href="http://photo.renren.com/photo/zuji/880151247" target="_blank">足迹</a>
</li>
<li class="nf-group-item">
<a href="http://gift.renren.com/show/box/otherbox?userId=880151247" target="_blank">礼物</a>
</li>
<li class="nf-group-item"><a href="http://page.renren.com/home/friendspages/view?uid=880151247" target="_blank">公共主页</a></li>
<li class="nf-group-item">
<a href="http://www.renren.com/lifeevent/index/880151247">生活纪事</a>
</li>
<li class="nf-group-item">
<a href="http://mvideo.renren.com/video/880151247/list">短视频</a>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
</div><script type="text/javascript">(function () {define(function (require, exports) {var responseFrame = require('responseFrame');responseFrame.initFrameSize();});})();</script><div class="bd-main"><div class="bd-content clearfix"><div id="profile_wrapper"><div class="top-attach clearfix" id="top-attach"></div><div id="timeline_wrapper"><div id="cover"><div class="avatar"><div class="figure_con"><figure id="uploadPic"><a href="http://photo.renren.com/getalbumprofile.do?owner=880151247" target="_blank"><img width="177" src="http://hdn.xnimg.cn/photos/hdn321/20150701/1750/main_TR0R_54080003fbbd1986.jpg" id="userpic" /></a></figure></div></div><div class="cover-bg"><h1 class="avatar_title">大鹏董成鹏<img src="http://a.xnimg.cn/apps/profile2/res/feed/super.png"title="《屌丝男士》导演兼主演、《大鹏嘚吧嘚》主持人、赵本山53位弟子"><span>(545788人看过)<a href="http://help.renren.com/helpcenter#http://help.renren.com/helpcenter/search/getQuestionByMenuId?menuId:'1000217'"
class="user-type">
<img alt="星级" id="star" src="http://a.xnimg.cn/nx/timeline/res/image/stars.png"/>
<span class="more-tip">
<span class="tip-content">星级用户</span>
<span class="tip-footer"></span>
</span>
</a><a class="expired vip-level" href="http://i.renren.com/icon" title="点击更换VIP图标">1</a></span></h1><p class="authentication">《屌丝男士》导演兼主演、《大鹏嘚吧嘚》主..</p><div class="friend-area clearfix">
<button id="followAdd" data-id="880151247" data-flag="0" data-name="大鹏董成鹏" class="ui-button ui-button-green btn-follow">
<span class="ui-icon ui-iconfont"></span>
<span class="ui-button-text">关注好友</span>
</button>
<!--没有开通关注,显示加好友按钮--><a id="settingMenu" class="setting" href="javascript:;" title="设置"></a><div id="settingList">
<ul class="clearfix"><li><a href="http://www.renren.com/Poke.do?id=880151247"
onclick="window.webpager.talk('880151247');return false;">打招呼</a></li>
<li><a href="http://gift.renren.com/send.do?fid=880151247"
target="_blank">送礼物</a></li>
<li><a id="addBlock" href="javascript:;">加入黑名单</a></li><li>
<a href="http://support.renren.com/report/common?type=1&contentId=880151247&origURL=/profile.do?id=880151247">举报</a>
</li>
</ul>
</div></div></div></div><div></div><div id="operate_area" class="clearfix"><div class="tl-information">
<ul><li class="school"><span>就读于吉林建筑大学</span></li>
<li class="birthday">
<span>男生</span> <span>,1月12日</span></li>
<li class="hometown">来自 吉林 通化市</li>
<li class="address">现居 北京</li></ul></div><div id="func_area" class="clearfix"><section><button class="func_button button_save" id="save_action">保存</button><button class="func_button button_cancel" id="cancel_action">取消</button></section></div></div><div id="timeline" class="clearfix"><div class="tl-left-module"><div class="gossip-box"><div class="friend-gossip clearfix"><div class="gossip-l">留言功能已全面升级为聊天,</br>查看我们的<a href="http://gossip.renren.com/list/880151247?page=0" target="_blank">历史留言记录</a></div><div class="gossip-r"><a class="send-message" onclick="window.webpager.talk('880151247');" href="javascript:;">和Ta聊天</a></div></div></div></div><div class="visit-special-con"><div id="footprint-box" class="clearfix">
<h5>
最近来访&nbsp;545788</h5>
<script type="text/javascript">
function cutImg(img){if(img.width >= img.height) {img.width = 30 * img.width / img.height;
img.height = 30;
offset = (img.width - 30) * 0.5;
img.style.left = -offset + 'px';
} else {img.height = 30 * img.height / img.width;
img.width = 30;
offset = (img.height - 30) * 0.5;
img.style.top = -offset + 'px';
}
}
</script>
<ul><li>
<a namecard="959824258" href="http://www.renren.com/profile.do?portal=homeFootprint&amp;ref=home_footprint&amp;id=959824258"><img src="http://hdn.xnimg.cn/photos/hdn421/20171007/0725/h_head_XqPG_ce0d00068cc91986.jpg" onload="cutImg(this);"/></a>
<span class="time-tip">
<span class="tip-content">qzuser 16:54</span>
<span class="tip-footer"></span>
</span>
</li><li>
<a namecard="899624621" href="http://www.renren.com/profile.do?portal=homeFootprint&amp;ref=home_footprint&amp;id=899624621"><img src="http://head.xiaonei.com/photos/0/0/men_head.gif" onload="cutImg(this);"/></a>
<span class="time-tip">
<span class="tip-content">赵小刚 16:39</span>
<span class="tip-footer"></span>
</span>
</li><li>
<a namecard="433739302" href="http://www.renren.com/profile.do?portal=homeFootprint&amp;ref=home_footprint&amp;id=433739302"><img src="http://hdn.xnimg.cn/photos/hdn121/20181202/1615/head_oWhs_0abe00001c43195a.jpg" onload="cutImg(this);"/></a>
<span class="time-tip">
<span class="tip-content">李娜 16:21</span>
<span class="tip-footer"></span>
</span>
</li><li>
<a namecard="233742858" href="http://www.renren.com/profile.do?portal=homeFootprint&amp;ref=home_footprint&amp;id=233742858"><img src="http://hdn.xnimg.cn/photos/hdn421/20130228/2235/h_head_C0H0_716000000180113e.jpg" onload="cutImg(this);"/></a>
<span class="time-tip">
<span class="tip-content">姜尉尉 15:52</span>
<span class="tip-footer"></span>
</span>
</li><li>
<a namecard="443362311" href="http://www.renren.com/profile.do?portal=homeFootprint&amp;ref=home_footprint&amp;id=443362311"><img src="http://hdn.xnimg.cn/photos/hdn121/20170428/1700/head_nhiB_aebd0000854a1986.jpg" onload="cutImg(this);"/></a>
<span class="time-tip">
<span class="tip-content">黄勇 15:37</span>
<span class="tip-footer"></span>
</span>
</li><li>
<a namecard="258607431" href="http://www.renren.com/profile.do?portal=homeFootprint&amp;ref=home_footprint&amp;id=258607431"><img src="http://hdn.xnimg.cn/photos/hdn521/20130728/0125/h_head_WFPR_dbe30000079f111a.jpg" onload="cutImg(this);"/></a>
<span class="time-tip">
<span class="tip-content">赵金宝 15:34</span>
<span class="tip-footer"></span>
</span>
</li><li>
<a namecard="77724094" href="http://www.renren.com/profile.do?portal=homeFootprint&amp;ref=home_footprint&amp;id=77724094"><img src="http://hdn.xnimg.cn/photos/hdn521/20120928/1650/h_head_1q58_0d500000326d1375.jpg" onload="cutImg(this);"/></a>
<span class="time-tip">
<span class="tip-content">田孝才 15:28</span>
<span class="tip-footer"></span>
</span>
</li><li>
<a namecard="329060729" href="http://www.renren.com/profile.do?portal=homeFootprint&amp;ref=home_footprint&amp;id=329060729"><img src="http://hdn.xnimg.cn/photos/hdn121/20130324/1945/h_head_t265_65df0000042d111a.jpg" onload="cutImg(this);"/></a>
<span class="time-tip">
<span class="tip-content">范治辰♂Vincent 15:08</span>
<span class="tip-footer"></span>
</span>
</li><li>
<a namecard="313714056" href="http://www.renren.com/profile.do?portal=homeFootprint&amp;ref=home_footprint&amp;id=313714056"><img src="http://hdn.xnimg.cn/photos/hdn121/20170726/2100/h_head_XmuQ_4e92000851e31986.jpg" onload="cutImg(this);"/></a>
<span class="time-tip">
<span class="tip-content">美航 14:17</span>
<span class="tip-footer"></span>
</span>
</li><li>
<a namecard="524411762" href="http://www.renren.com/profile.do?portal=homeFootprint&amp;ref=home_footprint&amp;id=524411762"><img src="http://head.xiaonei.com/photos/0/0/men_head.gif" onload="cutImg(this);"/></a>
<span class="time-tip">
<span class="tip-content">张昊 14:05</span>
<span class="tip-footer"></span>
</span>
</li><li>
<a namecard="397187434" href="http://www.renren.com/profile.do?portal=homeFootprint&amp;ref=home_footprint&amp;id=397187434"><img src="http://hdn.xnimg.cn/photos/hdn321/20140222/1905/head_zZbK_47020004ddb6111a.jpg" onload="cutImg(this);"/></a>
<span class="time-tip">
<span class="tip-content">杜凯 13:57</span>
<span class="tip-footer"></span>
</span>
</li>
</ul>
</div>
<script type="text/javascript">
object.use('dom', function(dom) {dom.getElement('#footprint-box').delegate('li', 'mouseover', function(e) {var target = XN.event.element(e),
li = dom.wrap(target).getParent('li');
li.className = 'show-tip';
});
dom.getElement('#footprint-box').delegate('li', 'mouseout', function(e) {var target = XN.event.element(e),
li = dom.wrap(target).getParent('li');
li.className = '';
});
});
</script><div id="specialfriend-box" class="clearfix">
<div class="friend-show clearfix">
<div class="share-friend">
<h5><a class="title"
href="http://friend.renren.com/otherfriends?id=880151247">好友&nbsp;97</a></h5>
<ul>
<li><a href="http://www.renren.com/261931652/profile"
namecard="261931652" target="_blank"><img width="30" height="30"
src="http://hdn.xnimg.cn/photos/hdn221/20120227/2105/tiny_43jB_543184m019118.jpg"></a>
</li>
<li><a href="http://www.renren.com/393034388/profile"
namecard="393034388" target="_blank"><img width="30" height="30"
src="http://hdn.xnimg.cn/photos/hdn421/20140529/1515/h_tiny_2AyD_8d9700006b661986.jpg"></a>
</li>
<li><a href="http://www.renren.com/237107261/profile"
namecard="237107261" target="_blank"><img width="30" height="30"
src="http://hdn.xnimg.cn/photos/hdn221/20170413/2140/h_tiny_flXG_13bc000893231986.jpg"></a>
</li>
<li><a href="http://www.renren.com/251597252/profile"
namecard="251597252" target="_blank"><img width="30" height="30"
src="http://hdn.xnimg.cn/photos/hdn321/20180724/1610/tiny_ni22_aec80000c1d61986.jpg"></a>
</li>
<li><a href="http://www.renren.com/247507221/profile"
namecard="247507221" target="_blank"><img width="30" height="30"
src="http://hdn.xnimg.cn/photos/hdn121/20150706/0255/h_tiny_QAGy_806d000121b11986.jpg"></a>
</li>
<li><a href="http://www.renren.com/272215404/profile"
namecard="272215404" target="_blank"><img width="30" height="30"
src="http://hdn.xnimg.cn/photos/hdn321/20160701/2130/tiny_pRXD_b03a00000d47195a.jpg"></a>
</li>
<li><a href="http://www.renren.com/200291699/profile"
namecard="200291699" target="_blank"><img width="30" height="30"
src="http://hdn.xnimg.cn/photos/hdn321/20120307/2245/tiny_dNdc_50790i019118.jpg"></a>
</li></ul>
</div>
<div class="has-friend">
<h5><a class="title"
href="http://follow.renren.com/list/880151247/sub/v7">粉丝&nbsp;1028110</a>
</h5>
<ul>
<li><a href="http://www.renren.com/968978652/profile" namecard="968978652"
target="_blank"><img width="30" height="30" src="http://head.xiaonei.com/photos/0/0/men_tiny.gif"></a></li>
<li><a href="http://www.renren.com/968865499/profile" namecard="968865499"
target="_blank"><img width="30" height="30" src="http://hdn.xnimg.cn/photos/hdn221/20181124/0030/h_tiny_6lqT_61ec0009e3ca1986.jpg"></a></li>
<li><a href="http://www.renren.com/968977740/profile" namecard="968977740"
target="_blank"><img width="30" height="30" src="http://hdn.xnimg.cn/photos/hdn421/20181202/1425/h_tiny_pXX1_0c1900017db3195a.jpg"></a></li></ul>
</div></div></div></div></div><div class="born" id="born-le">
<div class="timeline_marker" data-time="born"><span>出生</span></div>
<div class="timeline_feed tlf_feed">
<section class="tl-a-feed">
<article class="content">
<div class="content-main">
<div class="life-event">
<span class="avatar">
<img src="http://a.xnimg.cn/apps/profile2/res/lifeevent/le-born.png">
</span>
<h3 class="event-type">呱呱坠地鸟</h3>
<p class="event-info">1982 -1-12</p>
</div>
</div>
</article>
</section><i></i>
</div>
</div>    </div><div id="timeline_nav"><div id="ad_box"></div></div></div><input type="hidden" id="showLoverPage"value="false"/><input type="hidden" id="showSite" value="false"/><input type="hidden" id="showMovie" value="false"/></div></div><div class="ft-wrapper clearfix"><p><strong>玩转人人</strong><a href="http://page.renren.com/register/regGuide/" target="_blank">公共主页</a><a href="http://zhibo.renren.com" target="_blank">美女直播</a><a href="http://support.renren.com/helpcenter" target="_blank">客服帮助</a><a href="http://www.renren.com/siteinfo/privacy" target="_blank">隐私</a></p><p><strong>商务合作</strong><a href="http://page.renren.com/marketing/index" target="_blank">品牌营销</a><a href="http://bolt.jebe.renren.com/introduce.htm" class="l-2" target="_blank">中小企业<br />自助广告</a><a href="http://dev.renren.com/" target="_blank">开放平台</a><a href="http://dsp.renren.com/dsp/index.htm" target="_blank">人人DSP</a></p><p><strong>公司信息</strong><a href="http://www.renren-inc.com/zh/product/renren.html" target="_blank">关于我们</a><a href="http://page.renren.com/gongyi" target="_blank">人人公益</a><a href="http://www.renren-inc.com/zh/hr/" target="_blank">招聘</a><a href="#nogo" id="lawInfo">法律声明</a><a href="http://s.xnimg.cn/a92221/wap/mobile/Reporting/index.html" target="_blank">举报流程</a></p><p><strong>友情链接</strong><a href="http://fenqi.renren.com/" target="_blank">人人分期</a><a href="https://licai.renren.com/" target="_blank">人人理财</a><a href="http://www.woxiu.com/" target="_blank">我秀</a><a href="http://zhibo.renren.com/" target="_blank">人人直播</a>    <a href="http://www.renren.com/" target="_blank">人人网</a><a href="https://www.kaixin.com" target="_blank">开心汽车</a>   </p><p><strong>人人移动客户端下载</strong><a href="http://mobile.renren.com/showClient?v=platform_rr&psf=42064" target="_blank">iPhone/Android</a><a href="http://mobile.renren.com/showClient?v=platform_hd&psf=42067" target="_blank">iPad客户端</a><a href="http://mobile.renren.com" target="_blank">其他人人产品</a></p><!--<p class="copyright-info">--><!-- 临时添加公司信息用 --><p class="copyright-info" style="margi-left: -20px"><span>公司全称:北京千橡网景科技发展有限公司</span><span>公司电话:010-84481818</span><span><a href="mailto:admin@renren-inc.com">公司邮箱:admin@renren-inc.com</a></span><span>公司地址:北京市朝阳区酒仙桥中路18号<br>国投创意信息产业园北楼5层</span><span>违法和不良信息举报电话:027-87676735</span><span><a href="http://jb.ccm.gov.cn/" target="_blank">12318全国文化市场举报网站</a></span><span>京公网安备11000002002001号</span><span><a href="http://report.12377.cn:13225/toreportinputNormal_anis.do" target="_blank"><img style="height: 22px;float: left; margin-left: 78px;" src="http://s.xnimg.cn/imgpro/civilization/jubaologoNew.png">网上有害信息举报中心</a></span><span><img id="wenhuajingying_icon" style="height: 28px;float: left; margin-left: 60px;" src="http://s.xnimg.cn/imgpro/civilization/wenhuajingying.png"/><a href="http://sq.ccm.gov.cn/ccnt/sczr/service/business/emark/toDetail/DFB957BAEB8B417882539C9B9F9547E6" target="_blank">京网文[2016]0775-060号</a></span><span><a href="http://www.miibeian.gov.cn/" target="_blank">京ICP证090254号</a></span><span>人人网&copy;2016</span><span><img src="http://a.xnimg.cn/imgpro/black-logo.png" style="vertical-align: text-top;"></span></p></div><!-- dj埋码 --><script type="text/javascript">function sendStats(url){var n="log_"+(new Date).getTime();var c=window[n]=new Image;c.onload=c.onerror=function(){window[n]=null};c.src=url;c=null}function goPAGE() {var currentUrl = window.location.href.split('#')[0];if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {return "wap";}else {return "pc";}}var judge = goPAGE();(function(){sendStats('http://dj.renren.com/seostat?j={"from":"login_'+window.location.hostname+'","dev":"'+judge+'","page":"'+window.location.href+'"}');console.log('dj!!');})();</script></div></div></div>
</div>
<script>object.predefine('xn/mentionMain', 'http://s.xnimg.cn/n/core/modules/mention/index.js?ver=$revxxx$');
</script></body>
</html>

Scrapy框架:Request和Response对象,使用Request发送get请求、FormRequest发送post请求相关推荐

  1. SpringMvc4中获取request、response对象的方法

    springMVC4中获取request和response对象有以下两种简单易用的方法: 1.在control层获取 在control层中获取HttpServletRequest和HttpServle ...

  2. ASP.NET之Request和Response对象

    经过了牛腩新闻公布系统和html的学习对B/S开发的流程有了些理解.前面尽管用到了非常多知识.但对制作网页仅仅能说知其然.当学到asp.net视频中的解说才干够说開始知其所以然了. 今天来说说clie ...

  3. Net中的Request和Response对象的理解

    Request 和 Response 对象起到了服务器与客户机之间的信息传递作用.Request 对象用于接收客户端浏览器提交的数据,而 Response 对象的功能则是将服务器端的数据发送到客户端浏 ...

  4. SpringMVC 自动注入 Request 和 Response 对象

    问题 当我们第一次接触到 Java Web 开发,从最原生的 Servlet 方法开始,我们就知道在 doGet() 或者 doPost() 方法有两个形参,分别是 HttpServletReques ...

  5. Request、Response对象的生命周期

    Request.Response对象的生命周期: 1.浏览器像servlet发送请求 2.tomcat收到请求后,创建Request和Response两个对象的生命周期,并且将浏览器请求的参数传递给S ...

  6. Scrapy爬虫框架学习之Response对象

    一.什么是Response对象? response对象是用来描述一个HTTP响应的,一般是和request成对出现,你用浏览器浏览网页的时候,给网站服务器一个request(请求),然后网站服务器根据 ...

  7. request和response对象如何解决中文乱码问题?

    出现中文乱码的问题,一般的原因编码和和解码不一致造成的. 1 /* 2 乱码:编码和解码不一致导致的 3 GET:你好 4 POST:?????? 5 tomcat版本:8.5及以上版本 6 GET请 ...

  8. Request和Response对象

    Django使用请求和响应对象来通过系统传递状态. 当请求页面时,Django创建一个HttpRequest包含有关请求的元数据的对象.然后Django加载适当的视图,将HttpRequest第一个参 ...

  9. Java Request和Response对象 - Response篇

    文章目录 Response Response体系结构 Response设置响应数据 Response完成重定向 Response响应字符数据 Response 响应字节数据 Request: 使用 r ...

  10. JSP数据交互:request、response对象

    JSP数据交互之request对象 JSP内置对象是 Web 容器创建的一组对象 一.request对象主要用于处理客户端请求 1.什么是request? request是Servlet.servic ...

最新文章

  1. 明明程序员很累,为什么还有这么多人想入行?
  2. android service是单例么,android 使用单例还是service?
  3. python redis_Python操作Redis大全
  4. day06 : 01 Oracle 体系结构概念,内存结构,内存结构(服务器进程和用户进程)
  5. php websocket 实战,一次WebSocket项目实战后总结的经验
  6. python自动化测试常见面试题二_思考|自动化测试面试题第二波
  7. python中number函数_Python 数字(Number)
  8. 关于Python的一些学习笔记(小白式笔记,持续更新)
  9. 目标检测中的正负样本
  10. 2018-10-15
  11. module_param()函数
  12. php黑名单,php IP黑名单
  13. 网络请求返回数据格式_原生 Ajax 详解 - 响应数据格式
  14. java fastjson解析json_fastjson解析json数据 Java类
  15. oracle 建表sql语句,oracle 建表sql语句
  16. 微信公众号 隐藏菜单
  17. RK3288开发板PopMetal上的GPIO驱动实例
  18. thinkpad x250装黑苹果教程_ThinkPad E450c 傻瓜式黑苹果一键安装教程
  19. 系统学习机器学习之特征工程(一)--维度归约
  20. selenium处理12306登录

热门文章

  1. 戴姆勒集团将拆分卡车业务;洲际酒店集团发布全新品牌标识;先正达集团中国创新研发中心落户南京 | 美通企业周刊...
  2. OneNote 提示不能使用个人账户登录( 亲测可用)
  3. 微信小程序引用阿里巴巴矢量图标
  4. 10个优秀个android项目,精选|快速开发
  5. 操作系统基础知识复习总结
  6. 图片查看器-Python-tkinter
  7. 常用z反变换公式表_高中三角函数公式推理amp;记忆
  8. python分位点计算(正态分布,卡方分布,t分布,F分布)
  9. Linux----SSH远程连接服务
  10. DSP ADC模数转换