Looping through a directory on the web and displaying its contents (files and other directories) via Python

前端 未结 2 831
滥情空心
滥情空心 2021-01-27 10:28

In the same vein as Process a set of files from a source directory to a destination directory in Python I\'m wondering if it is possible to create a function that when given a w

2条回答
  •  庸人自扰
    2021-01-27 11:01

    What is a web directory?

    A web page has links. The page with the links may, or may not be, generated by the web server based on the contents of the directory.

    An example of automatically generating links is found here, and is possibly the result of something like mod_dir configuration in the Web server, Apache.

    What tools like wget, and curl, do, is take a page and download all links on that page, possibly recursively. I think that is the best you can achieve. And I have the feeling that questions about python + curl are abundant here in SO.

提交回复
热议问题