Example #1
0
    def __init__(self):
        super().__init__()
        self.setupUi(self)
        self.retranslateUi(self)
        self.setFixedSize(self.width(), self.height())

        self.log = MyLogClass()

        self.signals()
Example #2
0
 def __init__(self):
     self.driver = webdriver.Chrome(r"./chromedriver.exe")
     self.wait = WebDriverWait(self.driver, 10)
     self.driver.get("https://www.dianxiaomi.com/index.htm")
     self.log = MyLogClass()
     exampleInputName = self.wait.until(
         EC.element_to_be_clickable((By.ID, "exampleInputName")))
     exampleInputName.send_keys('caohongjing123')
     exampleInputPassword = self.wait.until(
         EC.element_to_be_clickable((By.ID, "exampleInputPassword")))
     exampleInputPassword.send_keys('Caohongjing001')
Example #3
0
 def __init__(self, user, password, path):
     try:
         self.user = user
         self.password = password
         self.path = path
         self.driver = webdriver.Chrome()
         self.wait = WebDriverWait(self.driver, 10)
         self.log = MyLogClass()
     except Exception as e:
         print(e)
         time.sleep(10)
Example #4
0
    def __init__(self):
        super().__init__()
        self.setupUi(self)
        self.retranslateUi(self)
        self.setFixedSize(self.width(), self.height())

        self.rsa = rsa_class()
        self.rsa.Sig_auth.connect(self.close)
        self.rsa.start()

        self.pushButton_condition.clicked.connect(self.run_condition)
        self.pushButton_chinese.clicked.connect(self.run_chinese)
        self.pushButton_condition_2.clicked.connect(self.run_condition_2)
        self.pushButton_chinese_2.clicked.connect(self.run_chinese_2)
        self.pushButton_txt.clicked.connect(self.intxt)

        self.datas = []
        self.var_1()
        self.var_2()

        self.mylog = MyLogClass()
Example #5
0
# -*- coding: utf-8 -*-
import requests
import re
import time
from artworkclass import ArtworkClass
import os
from mysqlclass import MysqlClass
from setting import url, img_path, start_page, end_page, table_name, headers, img_min_url
from mylogclass import MyLogClass
from concurrent.futures import ThreadPoolExecutor, as_completed

mylogObj = MyLogClass()


def request(url):
    try:
        rq_response = requests.get(url, headers=headers, timeout=10)
        if rq_response.status_code == 200:
            mylogObj.logger.info(url + "请求成功!")
            return rq_response
        else:
            mylogObj.logger.warning(url + "请求失败!code:" +
                                    str(rq_response.status_code))
            return None
    except Exception as e:
        mylogObj.logger.warning(url + "请求失败!code:" +
                                str(rq_response.status_code))
        mylogObj.logger.warning(e)
        return None

Example #6
0
                                            ['siteName', '=', self.siteName]]):
                        self.mylog.logger.warning(
                            '存在!' + li['modelObj']['sectionName'].encode(
                                'gbk', 'ignore').decode('gbk'))
                        print('存在!' + li['modelObj']['sectionName'].encode(
                            'gbk', 'ignore').decode('gbk'))
                        continue
                    OBJ = deepcopy(recognizance)
                    OBJ['siteName'] = self.siteName
                    OBJ['domain'] = self.domain
                    OBJ['projectId'] = seqid
                    OBJ['projectName'] = li['modelObj']['sectionName']
                    OBJ['projectNumber'] = li['modelObj']['sectionNumber']
                    OBJ['projectUrl'] = fzztb_recognizance
                    OBJ['company'] = company
                    self.save([OBJ])
            except Exception as e:
                print(e)
        if index['page']['totalPages'] > page:
            page += 1
            return self.getIndex(page)


if __name__ == '__main__':
    siteName = '马尾区建设工程电子招投标交易平台'
    domain = 'http://www.fzztb.com:25000'
    mylog = MyLogClass()
    db = db_class(mylog)
    f = FzztbRecognizance(siteName, domain, db, mylog)
    f.getIndex(1)
Example #7
0
 def __init__(self):
     self.mylog = MyLogClass()
     self.db = db_class(self.mylog)