摘要: import os,sys,os.pathprint('your current dir is {}'.format(os.getcwd()))if len(sys.argv)==1: while True: sourceDir=input('input source dir:'... 阅读全文
posted @ 2015-08-06 22:38 借物少年 阅读(539) 评论(0) 推荐(0)
摘要: #-*- coding:utf-8 -*-import smtplibimport sysimport timeimport threadingclass Mythread(threading.Thread): def __init__(self,username,pwd): t... 阅读全文
posted @ 2015-08-06 22:13 借物少年 阅读(523) 评论(0) 推荐(0)
摘要: # -*- coding:utf-8 -*- import urllibimport urllib.requestimport repage = 1 url = 'http://www.qiushibaike.com/hot/page/1'+str(page)user_agent = 'Mozil... 阅读全文
posted @ 2015-08-05 22:26 借物少年 阅读(396) 评论(0) 推荐(0)
摘要: post方式# -*- coding:utf-8 -*-import urllib.parse #python2 在这道程序中只需引入urllibimport urllib.request #python 在这道程序中引入urllib2values = {}values['username']=... 阅读全文
posted @ 2015-08-04 23:34 借物少年 阅读(140) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*-import urllib.requestimport reurl='http://s.weibo.com/weibo/%25E9%25BE%2599%25E9%25BA%2592&Refer=STopic_box'urlfile=urllib.requ... 阅读全文
posted @ 2015-08-01 23:18 借物少年 阅读(1297) 评论(0) 推荐(0)
摘要: urllib2是python2自带的模块,不需要下载。urllib2在python3.x中被改为urllib.request 阅读全文
posted @ 2015-08-01 22:29 借物少年 阅读(215) 评论(0) 推荐(0)