the-scouts / compass-interface-core

Core bridge/crawler component for Compass-Interface
5 stars 1 forks source link

Disclosures Tab #25

Closed aweddle2 closed 3 years ago

aweddle2 commented 3 years ago

Am I looking in the wrong place or is there currently no way of getting the data from disclosures tab on MemberProfile.aspx?

If not, are you accepting PRs?

AA-Turner commented 3 years ago

Hi Andrew

You can currently (with difficulty) if you do people_object._scraper._get_member_profile_tab(..., "Disclosures"), but that would only return a bytes representation of the page. You're right that there is no (current) way to get a parsed set of disclosure data - mainly as I didn't have a usecase for it. Also slight challenge of only Admin/Commissioner/etc roles can access disclosures data, so (for now) will need a bit of error checking, we may in future implement a local permissions triage from role class etc.

PR very welcome, if you set it up fairly early I can review as you're going along. Base implementation would be something like get_disclosures_tab in PeopleScraper, then a passthrough _disclosures_tab in People (do need to work on that class!).

Could you also let me know your Member No (here or email my firstname . surname at scouts.org.uk) - I did a cursory seach on Compass and couldn't find you.

Thanks! A

aweddle2 commented 3 years ago

I'm a former member and web developer trying to help a current member, non-developer but keen python student learn and get the data out they need.

I only raised this issued because I saw the comment on the class :

https://github.com/the-scouts/compass-interface-core/blob/master/compass/core/_scrapers/member.py#L40

and therefore expected a get_disclosures_tab method in the PeopleScraper class following your coding pattern. Any PR won't be coming from me unfortunately, just wanted to see if you were accepting contributions.

AA-Turner commented 3 years ago

No worries - part of this is documenting Compass itself, so docstrings are a blend of expected behaviour / existing stuff.

Accepting contributions - volunteer run project! If I've some time will implement it, otherwise happy for your friend to? I asked as useful to know who is using the library for small-p-political reasons.

AA-Turner commented 3 years ago

Fixed in 0.5.2!