<commit_before>from django_cron import CronJobBase, Schedule
from scrapers.govinfo import scrape
import billtracker.models as models

class InfoGovParser(CronJobBase):
    RUN_EVERY_MINS = 1

    schedule = Schedule(run_every_mins=RUN_EVERY_MINS)
    code = '[billtracker] InfoGov Parser'    # a unique code

    def do(self):
        results = scrape()
        for r in results:
            url = r["url"]
            if models.GovInfoScraper.objects.filter(url=url).count() == 0:
                models.GovInfoScraper.objects.create(
                    bill_name=r["name"],
                    bill_code=r["code"],
                    comment_startdate=r["startdate"],
                    comment_enddate=r["enddate"],
                    url=r["url"],
                )
            print url<commit_msg>Scraper now runs once a day<commit_after>from django_cron import CronJobBase, Schedule
from scrapers.govinfo import scrape
import billtracker.models as models

class InfoGovParser(CronJobBase):
    RUN_EVERY_MINS = 24 * 60

    schedule = Schedule(run_every_mins=RUN_EVERY_MINS)
    code = '[billtracker] InfoGov Parser'    # a unique code

    def do(self):
        results = scrape()
        for r in results:
            url = r["url"]
            if models.GovInfoScraper.objects.filter(url=url).count() == 0:
                models.GovInfoScraper.objects.create(
                    bill_name=r["name"],
                    bill_code=r["code"],
                    comment_startdate=r["startdate"],
                    comment_enddate=r["enddate"],
                    url=r["url"],
                )
{'fraction_non_alphanumeric': 0.09863523573200993, 'fraction_numerical': 0.004342431761786601, 'mean_word_length': 2.031954887218045, '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': '3512988', 'n_tokens_mistral': 499, 'n_tokens_neox': 463, 'n_words': 97}