Refactored to use requests module instead