http://www.perlmonks.org?node_id=656878


in reply to Automatic Uploader Script

divshare has an API that allows file upload. Use that.

It's documented, and you don't have to mess with web scraping and http cookies.

Replies are listed 'Best First'.
Re^2: Automatic Uploader Script
by sadarax (Sexton) on Dec 13, 2007 at 19:14 UTC
    Thanks. I did not know they had an API. Unfortunately it looks like there is no API for perl, hence my problem.

    I only know Perl and C/C++. I am not planning on learning PHP or something else just so I could write the script.

      There may be no API for perl yet, but they give detailed information about developing a new API. This should be enough for you to build the subset of the API you need (login, upload request, and an upload form). Alternatively, why not build the whole API and put it on CPAN for everyone to enjoy? The python example looked like about 200 lines of code.
      The API is language independent. It uses XML (afaict), which can be generated by any programming languages.

      It has no Perl implementation yet, but that should be easier to write than to start from WWW::Mechanize.

      So go ahead and create a good module, and upload it to CPAN ;-)