Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

http redirected downloads  RSS feed

 
Tay Thotheolh
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I decided to gain some experience by creating a simple download manager. I noticed that some download links on the internet are not direct links like "http://xxx.com/abcdef.iso" but some links like to have "http://xxx.com/sjjf?bjr=jfbf" some funny query string and redirect users to their downloads.So how do I handle the redirected downloads link ?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your HTTP handling code would need to detect a Redirect response, and respond to that by issuing a new request for the new URL. I think the Apache Commons HttpClient library can be set to follow redirects automatically.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!