예제 #1
0
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
예제 #2
0
 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)