KaylaCrush / advocacy-maps

The good governance project (GGP) is a non-partisan democracy reform group.
https://mapletestimony.org
MIT License
0 stars 1 forks source link

reorganize code #33

Closed KaylaCrush closed 1 year ago

KaylaCrush commented 1 year ago

lobbyingDataPage.py is getting pretty big for it's britches, currently housing all the helper functions that batch process url's, preform regex queries, and handle errors. I should either properly incorporate that functionality into the classes (specifically, I should be instantiating these with a url instead of html file) or move helper functions to another file

KaylaCrush commented 1 year ago

I did a first pass on this but I'm not entirely satisfied. I want to change how i instantiate datapages from using html to using a url - that way I can easily find the real page online when tracking down errors

KaylaCrush commented 1 year ago

hell yeah, added a PageFactory class that can be called with a url or html or both, and will return the correct data page, which now also can optionally be initialized with a url for debugging purposes