in reply to need help downloading a file

if ( ! $response->is_success ) { use Data::Dumper; print Dumper($response); ... }
Gives (in part)
... The owner of this website (download.fosshub.com) has banned your acces +s based on your browser\'s signature (38250110cd8b5c57-ua22). ...

sub DownloadWebFile { # Download the $Url's file my $IAm = ( caller(0) )[3]; # Incoming: my $Url = $_[0]; my $Timeout = $_[1]; my $Cookies = $_[2]; # 'oraclelicense=accept-securebackup-cookie' my $Referer = $_[3]; # "http://usa.kaspersky.com/windows10"; my $Host = $_[4]; # "download.fosshub.com"; my $FileName = $_[5]; # File name and path to save the file to my $Caller = "$_[6]" . "$IAm"; # Outgoing: my $PageStatus = \$_[7]; $$PageStatus = UPDATE; # 2 = good download my $ua; $ua = LWP::UserAgent->new; $ua->timeout ( MaxTime2 ); $ua->show_progress ( 1 ); # 0 = do not show; 1 = show my $req = new HTTP::Request (GET => $Url ,HTTP::Headers->new( 'Referer' => + 'https://www.fosshub.com/HWiNFO.html', 'User-Agent' => + 'Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0' ) ); my $response = $ua->request ($req); if ( ! $response->is_success ) { $$PageStatus = DOWNLOAD_FAIL; use Data::Dumper; print Dumper($response); print STDERR " ERROR ${Caller}.GetWebPage: unable to read ", $Url, "\n"; print STDERR $response->status_line; return ""; } }
Gives ** GET https://www.fosshub.com/HWiNFO.html/hw64_554.exe ==> 200 OK (4s)

Replies are listed 'Best First'.
Re^2: need help downloading a file
by marto (Cardinal) on Jul 22, 2017 at 08:52 UTC
    When you access www.fosshub.com or attempt to retrieve content or file +s that we host on our site or any other 3rd party service paid by us +we do not allow the following (exceptions apply - read below): - automate the download process using various tools or code (regardles +s of its type: open source or closed source) that can disrupt our ser +vice. - attempt to download from FossHub infrastructure using a script, prog +ram or any other similar tool without our approval

    https://www.fosshub.com/tos.html

      Didnt see that when i looked at https://www.fosshub.com/HWiNFO.html

      Exceptions
      - If you represent a non-profit organization focused on education, health or any other worthy cause.

      Well i certainly am non-profit and this was focused on education :)

      Is it binding if they dont force you to accept first?

        Exceptions If you wish to retrieve files from www.fosshub.com using an automated +tool or script with the purpose of redistributing them on your intern +al network, download server, download mirror, CDN or any other simila +r service we might allow you to do this under the following condition +s: - Inform us about your intention before any attempt to interact with o +ur website. If possible, provide us a sample of your code/tool to see + how it is designed to work with our system. - If you are the representative of a school, University or any other e +ducational institution. - If you represent a non-profit organization focused on education, hea +lth or any other worthy cause. - A company that wishes to retrieve files from us but use its own repl +ication system. - Any other situation that wasn't added here but you consider it to be + an exception. Important: We reserve the right to deny certain requests if we think t +hat will abuse our service or cause any other issues. Also, we reserv +e the legal right to request a financial compensation if you ignore o +ur Terms of Service.

        I've no idea what Todd Chester is doing, but it seems as though they'd have a working download had they followed the steps outlined above.

        A reply falls below the community's threshold of quality. You may see it by logging in.