麻痹i5 760论坛看了几天收不到800的,麻痹今天一个人出技嘉p55+760才卖950
3分钟后被人秒了我操!!
老子本来不想在刷论坛脚本里加发飞信的,现在我生气啦 555555
就想收i5 750/760和5850/5870公版....
正则不太会,写得烂,公版非公版那边如果有混一起的就不发短信了。
daemon模块是个python守护进程模块,没有这个模块直接把相关代码注释掉然后自己os.fock()两次就是
最新编辑,feixin那个完蛋了加了验证码不能登录啦feixin改版啦!
只能用下面这种短信平台了!
-
#! /usr/bin/python
-
# -*- coding: UTF-8 -*-
-
import struct,re,sys,time
-
import urllib,urllib2,cookielib
-
import threading
-
import daemon
-
-
p = daemon.DaemonContext()
-
p.open()
-
-
def fetion(msg):
-
url_login = ''
-
url_logout = ''
-
url_msg = ''
-
user = 'your phone'
-
password = 'your feixin pass'
-
loginstatus = '4'
-
arg_t = ''
-
cj = cookielib.LWPCookieJar()
-
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
-
urllib2.install_opener(opener)
-
args = {'pass':password, 'm':user,'loginstatus':loginstatus}
-
print 'Logining...'
-
req = urllib2.Request(url_login, urllib.urlencode(args))
-
jump = opener.open(req)
-
page = jump.read();
-
url = re.compile(r').findall(page)[0]
-
arg_t = re.compile(r't=(\d*)').findall(page)[0]
-
if url == '/im/login/login.action':
-
print "error"
-
return
-
sendmsg = urllib2.Request(url_msg, urllib.urlencode({'msg':msg}))
-
finish = urllib2.urlopen(sendmsg)
-
-
if finish.geturl == '' :
-
print 'Send Failed!'
-
else:
-
print 'Send Successfully'
-
logout = urllib2.Request(url_logout + arg_t)
-
response = urllib2.urlopen(logout)
-
finish.close()
-
jump.close()
-
response.close()
-
print 'Logout Successfully!'
-
#print response.read().decode('utf-8').encode('gbk')
-
-
-
def getUrl(condition,bbs_url,lock,url_list):
-
k = 0
-
while k == 0:
-
print url_list
-
try:
-
respone = urllib2.urlopen(bbs_url)
-
charset = respone.headers.getparam('charset')
-
if charset is None:
-
charset = "GBK"
-
Html_text = respone.read().decode(charset)
-
respone.close()
-
except:
-
print "error"
-
i = 0
-
lines = Html_text.split('\n')
-
for line in lines:
-
# print line
-
# if condition['re_CupAndP55'].search(line) or (condition['re_Video_No'].search(line) and condition['re_Video'].search(line)):
-
if condition['re_CupAndP55'].search(line) or ( not condition['re_Video_No'].search(line) and condition['re_Video_Yes'].search(line) and condition['re_Video'].search(line)):
-
# print "test===== " + line
-
link = re.compile('.*).findall(line)
-
if len(link) == 0:
-
true_link = re.compile('\/.*[0-9]').findall(lines[i-1])
-
if len(true_link)>0:
-
lock.acquire()
-
if '' + true_link[0] + '\n' not in url_list:
-
fetion("!!!!!2nd hand!!!!!!!check %s" % true_link[0])
-
try:
-
try:
-
f = open('/root/2hand.txt','a+')
-
f.writelines('%s\n' % true_link[0])
-
url_list.append('%s\n' % true_link[0])
-
finally
-
f.close()
-
except:
-
pass
-
lock.release()
-
else:
-
lock.acquire()
-
if link[0] + '\n' not in url_list:
-
fetion("!!!!!2nd hand!!!!!!!check %s" % link[0])
-
try:
-
try:
-
f = open('/root/2hand.txt','a+')
-
f.writelines('%s\n' % link[0])
-
url_list.append('%s\n' % link[0])
-
finally:
-
f.close()
-
except:
-
pass
-
lock.release()
-
i += 1
-
time.sleep(60)
-
# k += 1
-
-
class myGet(object):
-
def __init__(self,input_list):
-
self.lock = threading.Lock()
-
self.url_list = input_list
-
self.url = {'gz':'','zol':'/subcate_list_300.html','chh':''}
-
self.condition = {'re_CupAndP55':re.compile(r'(?=i5 760|i5 750|i5750|i5760i|p7p55d).*/a>',re.I),\
-
're_Video':re.compile('(5850|5870).*/a>',re.I),\
-
're_Video_Yes':re.compile(u'公版',re.I),\
-
're_Video_No':re.compile(u'非公版',re.I)}
-
-
def run(self):
-
for i in self.url.values():
-
postThread = threading.Thread(target=getUrl,args=(self.condition,i,self.lock,self.url_list))
-
postThread.start()
-
-
if __name__ == '__main__':
-
f = open('/root/2hand.txt','a+')
-
input_list = f.readlines()
-
f.close()
-
get = myGet(input_list)
-
get.run()
阅读(1502) | 评论(0) | 转发(0) |