List web url dir contents
I wanna list a external webpage's ulr's content. like i wan开发者_如何转开发na list the content of this website example.com/dir/dir/images/
currently i can download an image from a page with:
urllib.urlretrieve(page_url,save_url )
But I want to list all images in a directory, or anything ells for that matter
I wanna use python
Unfortunately this can only work if the web server in question will serve you a directory listing when you navigate to that directory's URI.
If it does, typical directory listings have very simple markup, making them a prime candidate for various forms of web scraping. Otherwise, you're out of luck.
精彩评论