码迷,mamicode.com
首页 >  
搜索关键字:user_agent    ( 1107个结果
用python爬虫爬取饿了么外卖店铺排名
#!/usr/bin/envpython #encoding:utf-8 """ @version:?? @author:phpergao @license:ApacheLicence @file:elm_paiming.py @time:2016/8/211:18 """ importrequests,re,urllib,codeop,urllib.request,nturl2path,macurl2path User_Agent="Mozilla/5.0(WindowsNT10.0;WOW64)App..
分类:编程语言   时间:2016-08-02 17:23:49    阅读次数:2409
编写可维护的JavaScript-第12章-浏览器嗅探
1.User-Agent检测 只检测旧版本的浏览器 不要依赖对UA的检测,用户是可以修改的 2.特性检测 就是说,我们可以不检测UA,直接检测特定的方法(例如:getElementById)有没有 探测标准方法 探测不同浏览器的特定方法 方法都没有的时候,提供一个解决方案 3.避免特性推断 不能通过 ...
分类:编程语言   时间:2016-07-21 21:35:29    阅读次数:145
http 缓存相关
首先分享一下CI中文件强制下载时的header设置。 [php] view plain copy if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE") !== FALSE) { header('Content-Type: "'.$mime.'"'); hea ...
分类:Web程序   时间:2016-07-19 20:37:27    阅读次数:186
nginx日志格式
日志格式 log_format main '$remote_addr - $remote_user [$time_local] $request ' '"$status" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_ ...
分类:其他好文   时间:2016-07-15 06:32:55    阅读次数:121
selenium 2.0 part 2
1.9 拖拉(Drag andDrop) 1.10 导航 (Navigationand History) 打开一个新的页面: 通过历史导航返回原页面: 2 高级使用 2.1.1 改变user agent User Agent的设置是平时使用得比较多的操作: 2.1.2 读取Cookies 2.1.3 ...
分类:其他好文   时间:2016-07-11 19:01:44    阅读次数:255
lnmp 涂鸦
<directory/data/www/mmm>allowoverridenoneoptionsnoneorderallow,denyallow</directory><filesmatch"(.*)php(.*)">orderallow,denyallowfromall<filesmatch>禁用useragentrewritecond%{http_user_agent}".*curl.*"[nc,or]rewritecond%{http_user_age..
分类:其他好文   时间:2016-07-11 01:21:00    阅读次数:149
apache 限制指定user_agent
有些user_agent 不是我们想要的,可以通过rewrite功能针对 %{HTTP_USER_AGENT} 来rewirete到404页,从而达到限制某些user_agent的请求。 配置如下 <IfModule mod_rewrite.c> RewriteEngine on RewriteCo ...
分类:Web程序   时间:2016-07-09 22:08:16    阅读次数:163
IIS设置文件 Robots.txt 禁止爬虫
robots.txt用于禁止网络爬虫访问网站指定目录。robots.txt的格式采用面向行的语法:空行、注释行(以#打头)、规则行。规则行的格式为:Field: value。常见的规则行:User-Agent、Disallow、Allow行。 User-Agent行 Disallow和Allow行 ...
分类:其他好文   时间:2016-07-05 17:01:34    阅读次数:153
LAMP--Apache 日志记录代理 ip 和真实客户端 ip
默认的log日志格式在主配置文件httpd.conf中可以看到:[root@localhost~]#vim/usr/local/apache2/conf/httpd.conf LogFormat"%h%l%u%t\"%r\"%>s%b\"%{Referer}i\"\"%{User-Agent}i\""combined LogFormat"%h%l%u%t\"%r\"%>s%b"common其中%h是记录访问者的IP,如果在web的..
分类:Web程序   时间:2016-07-05 10:28:46    阅读次数:261
LAMP--Apache 禁止指定 user_agent
user_agent可以当作浏览器标识,目前主流的浏览器有IE、chrome、Firefox、360、iPhone上的Safari、Android手机上的百度搜索引擎、google搜索引擎等很多,每一种浏览器都有对应的user_agent,下面列出几个常见的user_agent。Mozilla/4.0(compatible;MSIE6.0;WindowsNT5.1;Triden..
分类:Web程序   时间:2016-07-05 10:27:18    阅读次数:284
1107条   上一页 1 ... 70 71 72 73 74 ... 111 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!