def OnClick(self, event): try: self.updateStatus(self.frame, 0) url = 'https://mail.sina.com.cn/?from=mail' self.Automation(url) while 1: time.sleep(0.2) if self.driver.current_url != url: self.driver.minimize_window() time.sleep(2) get_cookies = self.driver.get_cookies() cookie_str = '' for s in get_cookies: cookie_str = cookie_str + s['name'] + '=' + s[ 'value'] + ';' break try: y = YSpider() t = threading.Thread(target=y.sinamail, args=(cookie_str, )) t.start() # 启动线程,即让线程开始执行 t.join() self.updateStatus(self.frame, 1) except Exception: self.updateStatus(self.frame, 2) except Exception: self.updateStatus(self.frame, 2)
def OnClick(self, event): try: self.updateStatus(self.frame, 0) url = 'https://mail.aliyun.com/alimail/auth/login?reurl=%2Falimail%2F' self.Automation(url) while 1: time.sleep(0.2) if self.driver.current_url != url: # self.driver.minimize_window() get_cookies = self.driver.get_cookies() cookie_str = '' for s in get_cookies: cookie_str = cookie_str + s['name'] + '=' + s[ 'value'] + ';' break try: # self.SetStatusText("爬取中...", 3) y = YSpider() t = threading.Thread(target=y.get_aliyun_mail, args=(cookie_str, )) t.start() t.join() self.updateStatus(self.frame, 1) except Exception: self.updateStatus(self.frame, 2) except Exception: self.updateStatus(self.frame, 2)
def OnClick(self, event): try: self.updateStatus(self.frame, 0) url = 'https://mail.qq.com/cgi-bin/loginpage' self.Automation(url) while 1: time.sleep(0.2) if self.driver.current_url != url: get_cookies = self.driver.get_cookies() cookie_str = '' for s in get_cookies: cookie_str = cookie_str + s['name'] + '=' + s[ 'value'] + ';' sid = re.findall('sid=(\w+)&?', self.driver.current_url)[0] break try: y = YSpider() t = threading.Thread(target=y.qq_mail, args=(cookie_str, sid)) t.start() # 启动线程,即让线程开始执行 t.join() self.updateStatus(self.frame, 1) except Exception: self.updateStatus(self.frame, 2) except Exception: self.updateStatus(self.frame, 2)
def OnClick(self, event): # try: self.updateStatus(self.frame, 0) url = 'https://mail.126.com/' self.Automation(url) while 1: time.sleep(0.2) if self.driver.current_url != url: get_cookies = self.driver.get_cookies() cookie_str = '' for s in get_cookies: cookie_str = cookie_str + s['name'] + '=' + s['value'] + ';' self.driver.quit() break # try: y = YSpider() y.get_wangyi(cookie_str) self.updateStatus(self.frame, 1)
def OnClick(self, event): try: self.updateStatus(self.frame,0) url = 'https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=13&ct=1556600210&rver=7.0.6737.0&wp=MBI_SSL&wreply=https%3a%2f%2foutlook.live.com%2fmail%2finbox%3fnlp%3d1%26RpsCsrfState%3d99f809e4-d908-a164-e17a-a4739e713c63&id=292841&aadredir=1&CBCXT=out&lw=1&fl=dob%2cflname%2cwld&cobrandid=90015' self.Automation(url) while 1: time.sleep(0.2) if 'https://outlook.live.com/mail/inbox' in self.driver.current_url: time.sleep(1) cookies_list = self.driver.get_cookies() self.driver.quit() break try: y = YSpider() t = threading.Thread(target=y.get_hotmail, args=(cookies_list,)) t.start() t.join() self.updateStatus(self.frame,1) except Exception: self.updateStatus(self.frame,2) except Exception: self.updateStatus(self.frame,2)