コード例 #1
0
 def main(self):
     global send, msg, initialize
     sys.path.append(os.path.abspath('.'))
     for n in range(3):
         try:
             from sendNotify import send, msg, initialize
             break
         except:
             self.getsendNotify()
     l = [
         'BARK', 'PUSH_KEY', 'TG_BOT_TOKEN', 'TG_USER_ID', 'TG_API_HOST',
         'TG_PROXY_HOST', 'TG_PROXY_PORT', 'DD_BOT_TOKEN', 'DD_BOT_SECRET',
         'QQ_SKEY', 'Q_SKEY', 'QQ_MODE', 'QYWX_AM', 'PUSH_PLUS_TOKEN'
     ]
     d = {}
     for a in l:
         try:
             d[a] = eval(a)
         except:
             d[a] = ''
     try:
         initialize(d)
     except:
         self.getsendNotify()
         return self.main()
コード例 #2
0
ファイル: jd_wabao.py プロジェクト: jsNO1/e
 def main(self, f=0):
     global send, msg, initialize
     sys.path.append(os.path.abspath('.'))
     for _ in range(2):
         try:
             from sendNotify import send, msg, initialize
             break
         except:
             self.getsendNotify()
     l = [
         'BARK_PUSH', 'BARK_ARCHIVE', 'BARK_GROUP', 'BARK_SOUND',
         'DD_BOT_SECRET', 'DD_BOT_TOKEN', 'FSKEY', 'GOBOT_URL', 'GOBOT_QQ',
         'GOBOT_TOKEN', 'GOTIFY_URL', 'GOTIFY_TOKEN', 'GOTIFY_PRIORITY',
         'IGOT_PUSH_KEY', 'PUSH_KEY', 'PUSH_PLUS_TOKEN', 'PUSH_PLUS_USER',
         'QMSG_KEY', 'QMSG_TYPE', 'QYWX_AM', 'QYWX_KEY', 'TG_BOT_TOKEN',
         'TG_USER_ID', 'TG_API_HOST', 'TG_PROXY_AUTH', 'TG_PROXY_HOST',
         'TG_PROXY_PORT'
     ]
     d = {}
     for a in l:
         try:
             d[a] = eval(a)
         except:
             d[a] = ''
     try:
         initialize(d)
     except:
         if f < 2:
             f += 1
             self.getsendNotify()
             return self.main(f)