Example #1
0
    def ProcessTask(self, task):
        crawlerParams = {
            'board': task['board'],
            'blFromJson': True,
            'start': -(task['searchPages']),
            'end': -1
        }

        crawler = Crawler.PttWebCrawler(crawlerParams)
        articles = crawler.parse_articles()

        if self.LOW_PRICE_TASK == task['type']:
            self.HandleLowPriceTask(articles, task)