New answers tagged

3

First of all, as per PEP8 I'd recommend you follow the best practices. Naming conventions allNagiosInfo -> this is most likely a constant, so: ALL_NAGIOS_INFO nagiosEntry, nagiosBaseURL, nagiosUsername, nagiosPassword, nagiosAuthType -> nagios_entry, nagios_base_url, nagios_username, nagios_password, nagios_auth_type. And so on with the naming, you got ...


3

Optimization and restructuring Function's responsibility The initial approach makes the read_page function depend on both requests and BeautifulSoup modules (though BeautifulSoup functionality/features is not actually used there). Then, a soup instance is passed to news_scraper(soup) function.To reduce dependencies let read_page function extract the remote ...


Top 50 recent answers are included