简介
该用户还未填写简介
擅长的技术栈
可提供的服务
暂无可提供的服务
import com.mongodb.DB;import com.mongodb.DBCollection;import com.mongodb.DBCursor;import com.mongodb.MongoClient;import java.net.UnknownHostException;/*** @author zhangzhengyi*/public class Yih
0x00 问题引出:最近在做一个买房自动化分析Python脚本,需要爬取网页。在使用urllib获取reqest的response的时候,还要进行解码。见语句:result = res.decode(‘utf-8’)1当执行该语句的时候,会造成异常:UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xe5 in position...
安装Django:sudo apt-get install python-django -y查看是否安装成功pythonimport djangodjango.get_version()安装mysqlsudo apt-get install mysql-server-5.6sudo apt-get install mysql-client-5.6安装Django和mysql连接的驱动s
#!/usr/bin/python# -*- coding: utf-8 -*-import urllib2import jsonimport sysimport timekeyword = 'port:8080'# 获取查询关键字page = '1'# 获取页数f = open('result.txt', 'w')# keyword = sys.argv[1]# 获取查
#!usr/bin/python# coding=utf-8import hashlibimport reimport urllibimport urllib2f = open('cms.txt', 'r')# host = 'http://ecard.sdwz.cn' + '/'# 金融一卡通测试host = 'http://www.xlcolor.cn/'#sho
#!/usr/bin/python# coding=utf-8import urllib2import cookielibimport timecj=cookielib.CookieJar()#获取Cookiejar对象opener=urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))#自定义opener,并将opener跟CookieJ
#!/usr/bin/python# coding=utf-8import urllib2values ={}data='''info={"username":"xxxx@foxmail.com","password":"x3d8d1200d278df5664761922ff2cEHBQ","code":"","autologin":false}'''# data = urllib.urlenc
#!/usr/bin/python# coding=utf-8import urllibimport urllib2import cookielibdata = {"lx":'5','bzxr.court_no':'0F1','curPage':'2'}data = urllib.urlencode(data)req = urllib2.Request("http://jinanzy.sdc
#!/usr/bin/python# -*- coding: utf-8 -*-# encoding=utf-8# Filename:states_code.pyimport urllib2class RedirctHandler(urllib2.HTTPRedirectHandler):def http_error_301(self, req, fp, code, msg, hea