def __init__(self, imageApi = None, dbConStr = None, msmqPath = None, picCutApi = None ): if imageApi: self.imageApi = imageApi else: self.imageApi = r'http://*****:*****@localhost:1433/news?driver=SQL Server Native Client 10.0' if msmqPath: self.msmqPath = msmqPath else: self.msmqPath = '\\PRIVATE$\\QueuePathNews' if picCutApi: self.picCutApi = picCutApi else: self.picCutApi = r'http://localhost:8037/WS/newsCutImage.ashx' self.dataHelper = SpiderData.SpiderDataHelper(self.dbConStr)
def startGetData(self): url = 'https://cq.fang.lianjia.com/loupan/jiangbei/pg' + str(self.page) spiderData = SpiderData.SpiderData() data = spiderData.getList(url) self.__saveHouseDataInExcel__(data) self.__getDataLen(data)