mirror of
https://github.com/simon987/od-database.git
synced 2025-12-16 16:19:05 +00:00
barebones crawl_server microservice
This commit is contained in:
@@ -71,7 +71,7 @@ class RemoteDirectoryCrawler:
|
||||
|
||||
try:
|
||||
directory = RemoteDirectoryFactory.get_directory(self.url)
|
||||
root_listing = directory.list_dir("/dl2/") # todo get path
|
||||
root_listing = directory.list_dir("/")
|
||||
directory.close()
|
||||
except TimeoutError:
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@ class HttpDirectory(RemoteDirectory):
|
||||
if self._should_ignore(link):
|
||||
continue
|
||||
|
||||
file_url = urljoin(path_url, link[1])
|
||||
file_url = urljoin(path_url, link.url)
|
||||
path, file_name = os.path.split(file_url[len(self.base_url) - 1:])
|
||||
|
||||
if self._isdir(link):
|
||||
|
||||
Reference in New Issue
Block a user