Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get the download link

 
Arifiadi Patahuddin
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Please help me to make a java program

i have problem
for example:
I have a download page with the URL name http://www.filestube.com/e745ba6956eca87503e9/go.html

that page has the download link ..
how to parse the page using java to get the download link ...
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

You will need to parse the HTML to retrieve the right URL. Just look for a good HTML parser, there are many around. You may need to use an abstraction layer for retrieving the HTML to handle cookies, logins etc properly. Check out JWebUnit and Apache Commons HttpClient.

Be warned though that in automatic downloads of sites you may violate the sites' terms and conditions. This may get you banned from the site (possibly on IP basis) or worse. I'm pretty sure that the site you gave does not allow it.
 
Arifiadi Patahuddin
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:Welcome to the Ranch!

You will need to parse the HTML to retrieve the right URL. Just look for a good HTML parser, there are many around. You may need to use an abstraction layer for retrieving the HTML to handle cookies, logins etc properly. Check out JWebUnit and Apache Commons HttpClient.

Be warned though that in automatic downloads of sites you may violate the sites' terms and conditions. This may get you banned from the site (possibly on IP basis) or worse. I'm pretty sure that the site you gave does not allow it.


thanks for attention
can you give me sample code to get the download link without having to click the download button..
i don't know how to parse java script
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic