def sendAny(self, desp=''): desp = str(desp) + ' -------- ' + os.getenv('ACCOUNT', '') msg = desp if self.messageType == '1': sendMail(self.mail, msg) if self.messageType == '2': sendWechat(sc_key=self.sc_key, desp=msg)
def sendAny(self, desp=''): desp = str(desp) msg = desp if self.messageType == '1': sendMail(self.mail, msg) if self.messageType == '2': sendWechat(sc_key=self.sc_key, desp=msg)
def send(self, desp='', isOrder=False): desp = str(desp) if isOrder: msg = desp + ' 类型口罩,已经下单了。24小时内付款' else: msg = desp + ' 类型口罩,下单失败了,快去抢购!' if self.messageType == '1': sendMail(self.mail, msg) if self.messageType == '2': sendWechat(sc_key=self.sc_key, desp=msg)
def send(self, desp='', isOrder=False): desp = str(desp) if isOrder: msg = desp + ' 类型口罩,已经下单了。24小时内付款' + ' -------- ' + os.getenv( 'ACCOUNT', '') else: # msg = desp + ' 类型口罩,下单失败了' return if self.messageType == '1': sendMail(self.mail, msg) if self.messageType == '2': sendWechat(sc_key=self.sc_key, desp=msg)
executable_path="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chromedriver") else: mybrowser = myWebdriver(chrome_options=chrome_options, executable_path="/usr/bin/chromedriver") if LOGIN: mybrowser.login(HEADLESS) while True: point = mybrowser.get_point(LOGIN) point.start = point.total msg = '每日登录:{}/1\t\n'.format(point.login) msg += '阅读文章:{}/6\t\n'.format(point.article_read) msg += '视听学习:{}/6\t\n'.format(point.video_watched) msg += '文章时长:{}/6\t\n'.format(point.article_time) msg += '视听时长:{}/6\t\n'.format(point.video_time) sendWechat('开始刷分。今日刷分:{},当前总分:{}'.format(point.today(), point.total), msg) # 阅读文章 if point.article_read + point.article_time < 12 and ARTICLE: mybrowser.wait_and_click(sel.PARTIAL_LINK, '学习理论') mybrowser.wait(sel.CLASS, 'text-wrap') articles = mybrowser.find_elements(By.CLASS_NAME, 'text-wrap') article_index_start = 0 article_page = 0 delay_per_step = 2 delay_steps = 5 action = ActionChains(mybrowser) action.key_down(Keys.ARROW_DOWN) action.key_up(Keys.ARROW_DOWN) while point.article_read < 6: if article_index_start < 20: