Open Julienvaralda opened 3 years ago
This is due to a change that came with Ruby 3. I am quoting Stackoverflow here:
open-uri
used to (before Ruby 3.0) overwriteKernel#open
with its own version which also supports reading from external URLs rather than simply opening local files or running commands.
Thus, you need to replace open
in ../lib/wayback_machine_downloader/archive_api.rb:8 with URI.open
and it will work again. This should have been adressed by the latest pull-request but this commit somehow isn't in the Ruby Gem version yet.
I think this has been fixed in commit 30475c5 and version 2.3.0, please upgrade.
@hartator you might want to close this issue.
impossible to execute???
usersession@MacBook ~ % wayback_machine_downloader http://monsite.com Downloading http://monsite.com to websites/monsite.com/ from Wayback Machine archives.
Getting snapshot pages/Users/usersession/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/wayback_machine_downloader-2.2.1/lib/wayback_machine_downloader/archive_api.rb:8:in
initialize': No such file or directory @ rb_sysopen - http://web.archive.org/cdx/search/xd?url=http://monsite.com&fl=timestamp,original&collapse=digest&gzip=false&filter=statuscode:200 (Errno::ENOENT) from /Users/usersession/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/wayback_machine_downloader-2.2.1/lib/wayback_machine_downloader/archive_api.rb:8:in
open' from /Users/usersession/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/wayback_machine_downloader-2.2.1/lib/wayback_machine_downloader/archive_api.rb:8:inget_raw_list_from_api' from /Users/usersession/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/wayback_machine_downloader-2.2.1/lib/wayback_machine_downloader.rb:88:in
get_all_snapshots_to_consider' from /Users/usersession/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/wayback_machine_downloader-2.2.1/lib/wayback_machine_downloader.rb:105:inget_file_list_curated' from /Users/usersession/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/wayback_machine_downloader-2.2.1/lib/wayback_machine_downloader.rb:168:in
get_file_list_by_timestamp' from /Users/usersession/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/wayback_machine_downloader-2.2.1/lib/wayback_machine_downloader.rb:309:infile_list_by_timestamp' from /Users/usersession/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/wayback_machine_downloader-2.2.1/lib/wayback_machine_downloader.rb:192:in
download_files' from /Users/usersession/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/wayback_machine_downloader-2.2.1/bin/wayback_machine_downloader:72:in<top (required)>' from /Users/usersession/.asdf/installs/ruby/3.0.0/bin/wayback_machine_downloader:23:in
load' from /Users/usersession/.asdf/installs/ruby/3.0.0/bin/wayback_machine_downloader:23:in<main>' usersession@MacBook-Pro ~ % which ruby /Users/usersession/.asdf/shims/ruby usersession@MacBook-Pro ~ % which wayback_machine_downloader /Users/usersession/.asdf/shims/wayback_machine_downloader