参考博客:Android HttpURLConnection 基础使用参考博客:Android访问网络,使用HttpURLConnection还是HttpClient?String getUrl = mUrl + "/login.ashx?type=authen&user=" + mEmail .....
分类:
移动开发 时间:
2015-09-18 09:21:36
阅读次数:
210
#-*-coding:utf-8-*-
__author__=‘magicpwn‘
importurllib2
importurllib
importCookie
#无参数时,一般访问用法及返回信息的获取
respon=urllib2.urlopen(‘http://www.baidu.com‘)
print‘code:‘,respon.getcode(),‘URL:‘,respon.geturl()
print‘==================Headers====..
分类:
编程语言 时间:
2015-08-17 07:40:28
阅读次数:
341
一,图片下载方法如果在源文件中,验证码是img形式,就非常好下载处理了。这里就不在陈述了,目前好多验证码都是数据流形式,需要编程处理,首先,要获取验证码的地址,例如:地址为http://aaa.bbb.ccc/codepublic static void GetURL() throws Client...
分类:
其他好文 时间:
2015-08-14 15:35:44
阅读次数:
100
Python简单的爬虫最简单的爬虫# -*- coding : utf-8 -*-
import urlliburl = 'http://www.baidu.com'html = urllib.urlopen(url)print html.read()也可以打印出网页的其他信息#获取状态码
print html.getcode()#获取传入的参数
print html.geturl()#获取网页的h...
分类:
编程语言 时间:
2015-08-01 22:05:27
阅读次数:
144
var Loc = function (host, path) { this.host = host; this.path = path; this.getUrl(); }; Loc.prototype.getUrl = function ()...
分类:
其他好文 时间:
2015-07-29 19:08:56
阅读次数:
89
一、urllib2发送请求import urllib2
url = 'http://www.baidu.com'
req = urllib2.Request(url)
response = urllib2.urlopen(req)
print response.read()
print response.geturl()
print response.info()
urllib2用一个Re...
分类:
Web程序 时间:
2015-07-16 22:16:01
阅读次数:
121
$(document).ready(function(){$("#btn").click(function(k) {//...var j = $("form").serializeArray();//序列化name/value$.ajax({type: 'GET', //这里用GETurl: 'aj...
分类:
Web程序 时间:
2015-06-02 11:05:50
阅读次数:
200
【urllib2】1、基本用法 。 2、geturl()方法 3、urllib.urlencode方法。 4、添加post数据 。 5、连接的过程最容易出错。
分类:
Web程序 时间:
2015-05-28 19:56:47
阅读次数:
143
#出处:http://python.jobbole.com/81351/#确定url并抓取页面代码,url自己写一个import urllib,urllib2def getUrl(): page=1 url="http://www.qiushibaike.com/hot/page/"+s...
分类:
编程语言 时间:
2015-05-16 00:00:01
阅读次数:
370
1.geturl---- 获取真实的urlfrom urllib.request import Request, urlopenfrom urllib.error import URLError, HTTPError old_url = 'http://rrurl.cn/b1UZuP' req...
分类:
其他好文 时间:
2015-05-14 20:21:01
阅读次数:
141