CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
download a "randomized file"?

 



StarkRavingCalm
User

Mar 8, 2017, 12:52 PM

Post #1 of 2 (3099 views)
download a "randomized file"? Can't Post

I am writing a script to check a web page for specific content using LWP::UserAgent and then download the links within. The problem is that the download link is like this:
http://webserver.example.com/content/5678/bitstream
http://webserver.example.com/content/5679/bitstream
etc...
When you click the link in a browser, the file gets downloaded by hitting that link but the filename itself is randomized. How do you download something like that?

I can't find any examples and at this point I have no code other than the content checker which is working without issue.

Does anyone know of a module that would support this type of download? Maybe LWP User Agent is not what I should be using.


(This post was edited by StarkRavingCalm on Mar 9, 2017, 11:58 AM)


StarkRavingCalm
User

Mar 10, 2017, 1:18 PM

Post #2 of 2 (3077 views)
Re: [StarkRavingCalm] download a "randomized file"? [In reply to] Can't Post

Actually wget is able to pull them down.
Not the most elegant solution and not very perl-y
I'll just put it in as a system call

But it works.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives