V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  dapengzhao  ›  全部回复第 9 页 / 共 11 页
回复总数  208
1  2  3  4  5  6  7  8  9  10 ... 11  
2018-08-07 17:40:31 +08:00
回复了 dapengzhao 创建的主题 问与答 有什么消灭蟑螂的方法?
已经试过投毒,陷阱(粘板),效果好像不大,没见到啥尸体,蟑螂晚上该开会还是开会,该打麻将还是打麻将。
坐等中奖
@ysc3839 好的谢谢已经贴了
格式咋调呢。。。。。。。。。。。。。。。。。。。。
#控制短信发送条件的装饰器
def cacheip(timeout=60*60*24, key='ip%stype%s'):
def out_func(func):
def in_func(*args, **kwargs):
#获取请求者 ip
ip = request.remote_addr
typename = request.form.get('typename')
#设置 key
cache_key = key%(ip,typename)
print(cache_key)
#首次请求 get 获取不到数据
value = cache.get(cache_key)
#程序出错返回 null
res = func(*args, **kwargs)
#发送短信的条件程序出错并且 key 首次出现
if value is None and res is 'null':
print('send message')
ip = request.remote_addr
typename = request.form.get('typename')
data = request.form.get('data')
#将 set key 值确保同一个 ip 多次请求只发一次短信,每天重置过期时间
cache.set(cache_key, ip, timeout=timeout)
#发短信
send_move(ip,typename,data)
return res
return in_func
return out_func
#控制微信发送条件的装饰器
def cacheip(timeout=60*60*24, key='ip%stype%s'):
def out_func(func):
def in_func(*args, **kwargs):
#获取请求者 ip
ip = request.remote_addr
typename = request.form.get('typename')
#设置 key
cache_key = key%(ip,typename)
print(cache_key)
#首次请求 get 获取不到数据
value = cache.get(cache_key)
#程序出错返回 null
res = func(*args, **kwargs)
#发送短信的条件程序出错并且 key 首次出现
if value is None and res is 'null':
print('send message')
ip = request.remote_addr
typename = request.form.get('typename')
data = request.form.get('data')
#将 set key 值确保同一个 ip 多次请求只发一次短信,每天重置过期时间
cache.set(cache_key, ip, timeout=timeout)
#发短信
send_move(ip,typename,data)
return res
return in_func
return out_func
2018-07-10 17:25:33 +08:00
回复了 Jialin 创建的主题 推广 [回复参与抽奖] 为我网正式上线了,欢迎围观
111111111111
2018-06-22 17:10:02 +08:00
回复了 chengxiao 创建的主题 问与答 搜狗微信公众号这个反爬有解吗?
爬啥
2018-06-14 14:03:59 +08:00
回复了 cherry12345 创建的主题 推广 团队绩效拿了 A,心情好送个礼,邮费我包哈
都当分母,那我就当一下分子吧
@golmic 去了知识星球上面有个搜索框输入了微信,视频,数据,微信视频,微信数据,都返回没有搜到。。。
@golmic 好的我去看看学习一下
我的爬虫运行一段时间也会报这个错我的解决方法时如果 ip 不被封就捕获这个异常睡一会然后在 while true 下 break 结束此次循环重新开始。
python web 爬虫收吗(北京实习一年)
2018-04-25 19:57:36 +08:00
回复了 dapengzhao 创建的主题 问与答 如何解析今日头条 js 获取_signature 参数
@ik wap 是指手机版吗,我看了手机版也有_signation 这个参数
2018-04-25 11:15:40 +08:00
回复了 dapengzhao 创建的主题 问与答 如何解析今日头条 js 获取_signature 参数
function(t) {
function e(t) {
var e = ascp.getHoney(),
i = "";
window.TAC && (i = TAC.sign("refresh" === t ? 0 : r.params.max_behot_time_tmp)),
r.params = _.extend({},
r.params, {
as: e.as,
cp: e.cp,
max_behot_time: "refresh" === t ? 0 : r.params.max_behot_time_tmp,
_signature: i
})
}
2018-04-11 11:34:11 +08:00
回复了 lovemaoyun 创建的主题 程序员 有什么快速的把 cookies 转 json 格式的工具吧
Postman 好像可以
@GooMS 以后找歌
“该剧被爆出有刘诗诗出演,不过,诗诗确实很适合演这个“侠女”的角色,希望诗诗能演。<br><img src="http://p3.pstatp.com/large/pgc-image/15223145376813a05173058" img_width="500" img_height="500" alt="这六部古装 IP 剧即将开拍,唐嫣刘诗诗郑爽热巴,谁将出演?" inline="0"><img src="http://p1.pstatp.com/large/pgc-image/1522314542716650abadf9a" img_width="500" img_height="379" alt="这六部古装 IP 剧即将开拍,唐嫣刘诗诗郑爽热巴,谁将出演?" inline="0">​​"&#8203;&#8203;"2·《白发皇妃》"

一发布 html 就被解析了,上面是没解析的样子(我去掉了头尾的 p 标签)
1  2  3  4  5  6  7  8  9  10 ... 11  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5336 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 39ms · UTC 07:26 · PVG 15:26 · LAX 00:26 · JFK 03:26
Developed with CodeLauncher
♥ Do have faith in what you're doing.