Community

Start with your question. Search first, choose the closest subject and keep personal details private. Posting guidelines
Notifications
Clear all

Built a small script to check a list of pharmacies against the register

4 Posts
3 Users
0 Reactions
410 Views
Musing
(@musing)
Noble Member
Joined: 2 years ago
Posts: 1231
Topic starter   [#197]

Nothing fancy. I had a list of about forty domains I had collected and no patience to look each one up by hand, so I wrote a small script that searches the national register for the pharmacy name and returns whether there is a row and whether the status is active.

Caveats, because someone will ask: it only works where the register exposes a search endpoint, it breaks whenever they change the HTML, and it cannot tell you whether the name on the site is the legal entity or a trading name. It is a filter, not a verdict.

Happy to post the approach if anyone wants it. Not posting the file, it is twenty lines of Python and half of them are asleep.



   
Quote
notcharlotte
(@notcharlotte)
Noble Member
Joined: 2 years ago
Posts: 1847
 

This is the correct amount of engineering for the problem. Manual checking is where people give up.



   
ReplyQuote
The-Alchimist
(@the-alchimist)
Illustrious Member
Joined: 1 year ago
Posts: 7066
 

Please post the approach, I would use it.



   
ReplyQuote
Musing
(@musing)
Noble Member
Joined: 2 years ago
Posts: 1231
Topic starter  

Will do a proper writeup this week. The short version is: fetch the search page, post the name, parse the result table, check for the word active.



   
ReplyQuote
Share: