def run(self): print("running page fetch for " + self.page.title) rest_api = RestAPI() self.page.content = (rest_api.get_page_content(self.page.content_url)) # print(self.page.content) self.fetchSignal.emit(self.page.content) # self.fetchSignal.emit() print('signal emitted') self.mutex.lock() if not self.restart: self.condition.wait(self.mutex) self.restart = False self.mutex.unlock()
def getContent(self): if self.content is None: rest_api = RestAPI() self.content = (rest_api.get_page_content(self.content_url)) return self.content