To run:
pip install -r requirements.txt
python3 DNSWatch-take-home.py
There are two main functions load_domain_feed and is_domain_in_domain_feed.
When load_domain_feed is called with a URL. It does an HTTP request to the URL to get the data. Then it splits the data into a list. That list is then converted to a HashSet and assigned to the global var _domain_feed.
This simply checks if the target is in the HashSet and returns a boolean.
Class: I made it its own class because it was supposed to be its own module and that made me comfortable using _domain_feed as global.
HashSet: Checking if the set contains a domain is O(1) assuming we don't have any collisions.