上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页

2018年12月12日

修改数据库字段、增加字段

摘要: import csvimport psycopg2class IO_rw(object): def __init__(self): self.csvfile = open("test_scouce.csv", "w") self.writer = csv.writer(self.csvfile) s 阅读全文

posted @ 2018-12-12 09:35 袁佳佳 阅读(1116) 评论(0) 推荐(0)

2018年12月11日

线程

摘要: import threadingfrom time import ctime,sleep### def music(func):# for i in range(2):# print ("I was listening to %s. %s" %(func,ctime()))# sleep(4)## 阅读全文

posted @ 2018-12-11 15:44 袁佳佳 阅读(161) 评论(0) 推荐(0)

重复请求

摘要: def post_req(url, data, *args, **kargs): pro = 0 req_content = '数据请求失败' headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKi 阅读全文

posted @ 2018-12-11 14:02 袁佳佳 阅读(142) 评论(1) 推荐(0)

2018年12月7日

With语句是什么

摘要: https://www.cnblogs.com/DswCnblog/p/6126588.html #大神写的 有一些事情,需要预先设置, 事后做清理工作,对于这种场景。python 有了with as 方法。例如打开文件 1、 file = open("/tmp/foo.txt") #打开 data 阅读全文

posted @ 2018-12-07 10:51 袁佳佳 阅读(211) 评论(0) 推荐(0)

2018年12月6日

拼接当前时间

摘要: >>> dir(time)['CLOCK_MONOTONIC', 'CLOCK_MONOTONIC_RAW', 'CLOCK_PROCESS_CPUTIME_ID', 'CLOCK_REALTIME', 'CLOCK_THREAD_CPUTIME_ID', '_STRUCT_TM_ITEMS', ' 阅读全文

posted @ 2018-12-06 15:13 袁佳佳 阅读(233) 评论(0) 推荐(0)

2018年12月3日

爬去微信公共号

摘要: 搜狗 爬去 微信公共号 修改url 原来 : http://mp.weixin.qq.com/profile?src=3&timestamp=1543820722&ver=1&signature=SGZvZziCiWTSw8HY*IqZxkeNHE8tH-*SR6WgB*Wb 阅读全文

posted @ 2018-12-03 15:18 袁佳佳 阅读(108) 评论(0) 推荐(0)

2018年11月23日

登录_待存储

摘要: import rsaimport reimport jsonimport timeimport requestsimport base64import urllib3import binasciiimport xlwtfrom lxml import etreeimport psycopg2from 阅读全文

posted @ 2018-11-23 12:52 袁佳佳 阅读(196) 评论(0) 推荐(0)

登录专用_ +提取

摘要: import rsaimport reimport jsonimport timeimport requestsimport base64import urllib3import binasciiimport xlwtfrom lxml import etreeurllib3.disable_war 阅读全文

posted @ 2018-11-23 09:06 袁佳佳 阅读(992) 评论(0) 推荐(0)

2018年11月22日

set去掉重复项

摘要: import res1 = '''<div class="list_li S_line1 clearfix" mid="4298926234497703" action-type="feed_list_item" >↵ <div class="WB_face W_fl"><a target="_bl 阅读全文

posted @ 2018-11-22 11:31 袁佳佳 阅读(359) 评论(0) 推荐(0)

微博爬取数据

摘要: import requestsfrom urllib.parse import urlencodefrom pyquery import PyQuery as pq#from pymongo import MongoClientbase_url = 'https://m.weibo.cn/api/c 阅读全文

posted @ 2018-11-22 10:59 袁佳佳 阅读(854) 评论(0) 推荐(0)

上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页

导航