<commit_before>#! /bin/python3

import time
import schedule
from twisted.internet import reactor, defer
from scrapy.crawler import CrawlerRunner
from scrapy.utils.log import configure_logging
from scrapy.utils.project import get_project_settings


def crawl_job():
    @defer.inlineCallbacks
    def crawl(runner):
        yield runner.crawl('toho_v2')
        yield runner.crawl('toho_v2', cinema_list="ＴＯＨＯシネマズ光の森",
                           keep_old_data=True)
        reactor.stop()
    configure_logging()
    runner = CrawlerRunner(get_project_settings())
    crawl(runner)
    reactor.run()
    return schedule.CancelJob


if __name__ == '__main__':
    def test():
        print("test")
    # schedule.every().day.at('11:54').do(crawl_job)
    schedule.every().minutes.do(crawl_job)
    schedule.every().minutes.do(test)
    while True:
        schedule.run_pending()<commit_msg>start to write schedule script<commit_after>#! /bin/python3

import time
import schedule
from twisted.internet import reactor, defer
from scrapy.crawler import CrawlerRunner
from scrapy.utils.log import configure_logging
from scrapy.utils.project import get_project_settings


def crawl_job():
    @defer.inlineCallbacks
    def crawl(runner):
        yield runner.crawl('toho_v2')
        yield runner.crawl('movix', keep_old_data=True)
        yield runner.crawl('aeon', keep_old_data=True)
        yield runner.crawl('united', keep_old_data=True)
        yield runner.crawl('kinezo', keep_old_data=True)
        yield runner.crawl('site109', keep_old_data=True)
        yield runner.crawl('cinemasunshine', keep_old_data=True)
        yield runner.crawl('forum', keep_old_data=True)
        yield runner.crawl('korona', keep_old_data=True)
        reactor.stop()
    configure_logging()
    runner = CrawlerRunner(get_project_settings())
    crawl(runner)
    reactor.run()
    return schedule.CancelJob


if __name__ == '__main__':
    schedule.every().day.at('13:00').do(crawl_job)
    while True:
        schedule.run_pending()
{'fraction_non_alphanumeric': 0.10836219693221177, 'fraction_numerical': 0.007916872835230085, 'mean_word_length': 3.691415313225058, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2660931', 'n_tokens_mistral': 683, 'n_tokens_neox': 645, 'n_words': 126}