def test_get_syscalls_man_page(): scrap = ManScrapper("http://man7.org/linux/man-pages/man2/syscalls.2.html") syscalls = scrap.getManPage(); assert syscalls.status_code == 200 assert 'syscalls' in syscalls.name
def open_urls_and_store_data(self): for url in self.urls: entity = ManScrapper(url) entity.save() # let's be nice to man page server. 1 request per second time.sleep(1)