Skip to content

Scrape bill status information of in-demand bills #51

@waldoj

Description

@waldoj

When bills have a high level of interest, on a day when they are slated for a hearing, scrape status updates, instead of waiting for the CSV to update.

For instance, this would yield the ID of every bill that’s had more than 50 views in the past hour that is listed on the docket for today:

SELECT DISTINCT bill_id
FROM dockets
WHERE bill_id IN
    (SELECT bill_id
    FROM bills_views
    WHERE date > DATE_SUB(CURDATE(), INTERVAL 1 HOUR)
    GROUP BY bill_id
    HAVING COUNT(*) >= 50)
AND date = CURDATE()

Of course, this doesn't help with the scraping, but at least it IDs the bills in question. Of course, the 50-view mark is entirely contrived.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions