Code for opening a specific URL and download all the files stored on it. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Code for opening a specific URL and download all the files stored on it.

Hi! How can write a code in python/java/c, that for a given URL, will download all the files stored in the given url address, using the files' links which are found in the same URL page?

22nd Feb 2017, 9:23 PM
‫ירון לביא‬‎
‫ירון לביא‬‎ - avatar
3 Answers
+ 9
😀 You want to know that just for research purposes, right? You don't want to drift over to the dark side?
22nd Feb 2017, 9:53 PM
Tashi N
Tashi N - avatar
+ 4
To start, send an http request to download the html source code. save the source code in an arraylistof strings. analyze every string for links to files. SSL is the most difficoult part when the site certificate is self signed or the certificate issuing authority is not recognized.In java you can include the site certificate to the trusted certificates or disable certificate authentication but consider the latter a bad practice to be used only for testing purposes.
23rd Feb 2017, 2:37 AM
seamiki
seamiki - avatar
+ 1
Tashi N, Haha, no dark side. I'm a student, and I have a lot of studies material that I need to download all the time. I just want to make this task easier for me and save time for myself :) .
23rd Feb 2017, 5:59 AM
‫ירון לביא‬‎
‫ירון לביא‬‎ - avatar