Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: saveResources_future and tab in WWW::Mechanize::Chrome

by Corion (Pope)
on May 13, 2020 at 12:04 UTC ( #11116755=note: print w/replies, xml ) Need Help??


in reply to Re^2: saveResources_future and tab in WWW::Mechanize::Chrome
in thread saveResources_future and tab in WWW::Mechanize::Chrome

Thank you for making me revisit my assumptions!

Indeed, the parameter for specifying the download directory was never used. This will be fixed in the next release of WWW::Mechanize::Chrome, which I will likely release this evening.

  • Comment on Re^3: saveResources_future and tab in WWW::Mechanize::Chrome

Replies are listed 'Best First'.
Re^4: saveResources_future and tab in WWW::Mechanize::Chrome
by 1nelly1 (Acolyte) on May 13, 2020 at 12:32 UTC
    Thank you! I think it was here:
    $names{ $resource->{url} } ||= File::Spec->catfile( $target_dir, $names{ $resource->{url} });
    Best regards
    1nelly1

      No, that's the part that works.

      The part that fails is in ub fetchResources_future, which doesn't respect any base directory at all currently. There, more or less the same thing has to happen:

      ... my $duplicates; my $old_target = $target; while( $filenames{ $target }) { $duplicates++; ( $target = $old_target )=~ s!\.(\w+)$!_$duplicates.$ +1!; }; - $names->{ $res->{url} } = $target; + $names->{ $res->{url} } = File::Spec->catfile( $base_dir, + $target ); };

        Ok. I see. Thank you for these insights.
        And many thanks for your quick help.
        Best regards
        1nelly1

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11116755]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2020-10-19 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (207 votes). Check out past polls.

    Notices?