How i follow tree folders from url

C

Chris Rebert

On Sun, Aug 30, 2009 at 1:20 AM,
Hello !

I wanna use python to follow the tree folders from one url.
Example :
If url is "www.site.com/first/ and "
"first" is first folder with next subfolders "01","02","03"
The result of script should be :

www.site.com/first/01/
www.site.com/first/02/
www.site.com/first/03/
Maybe urllib has some functions , but i don't know them.

HTTP has no equivalent to "ls". You have to either know the format the
of URLs yourself or spider the links on a given page.
To generate the URLs if you know the scheme, use range() and str.zfill().

Cheers,
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top