Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Help: Getting this Error: `open_http': 400 BAD REQUEST #307

Open
hupictz opened this issue Oct 3, 2024 · 15 comments
Open

Need Help: Getting this Error: `open_http': 400 BAD REQUEST #307

hupictz opened this issue Oct 3, 2024 · 15 comments

Comments

@hupictz
Copy link

hupictz commented Oct 3, 2024

Getting snapshot pages.../System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:359:in open_http': 400 BAD REQUEST (OpenURI::HTTPError) from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:737:in buffer_open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:212:in block in open_loop' from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:210:in catch'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:210:in open_loop' from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:151:in open_uri'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:717:in open' from /Library/Ruby/Gems/2.3.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader/archive_api.rb:13:in get_raw_list_from_api'
from /Library/Ruby/Gems/2.3.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:92:in block in get_all_snapshots_to_consider' from /Library/Ruby/Gems/2.3.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:91:in times'
from /Library/Ruby/Gems/2.3.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:91:in get_all_snapshots_to_consider' from /Library/Ruby/Gems/2.3.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:105:in get_file_list_curated'
from /Library/Ruby/Gems/2.3.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:164:in get_file_list_by_timestamp' from /Library/Ruby/Gems/2.3.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:309:in file_list_by_timestamp'
from /Library/Ruby/Gems/2.3.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:192:in download_files' from /Library/Ruby/Gems/2.3.0/gems/wayback_machine_downloader-2.3.1/bin/wayback_machine_downloader:72:in <top (required)>'
from /usr/local/bin/wayback_machine_downloader:22:in load' from /usr/local/bin/wayback_machine_downloader:22:in

'

@tokiyui
Copy link

tokiyui commented Oct 4, 2024

I also found a similar error.

$ wayback_machine_downloader http://www.ogurayui.jp/
Downloading http://www.ogurayui.jp/ to websites/www.ogurayui.jp/ from Wayback Machine archives.

Getting snapshot pages....../usr/share/ruby/open-uri.rb:364:in open_http': 400 BAD REQUEST (OpenURI::HTTPError) from /usr/share/ruby/open-uri.rb:741:in buffer_open'
from /usr/share/ruby/open-uri.rb:212:in block in open_loop' from /usr/share/ruby/open-uri.rb:210:in catch'
from /usr/share/ruby/open-uri.rb:210:in open_loop' from /usr/share/ruby/open-uri.rb:151:in open_uri'
from /usr/share/ruby/open-uri.rb:721:in open' from /home/user/.local/share/gem/ruby/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader/archive_api.rb:13:in get_raw_list_from_api'
from /home/user/.local/share/gem/ruby/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:92:in block in get_all_snapshots_to_consider' from /home/user/.local/share/gem/ruby/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:91:in times'
from /home/user/.local/share/gem/ruby/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:91:in get_all_snapshots_to_consider' from /home/user/.local/share/gem/ruby/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:105:in get_file_list_curated'
from /home/user/.local/share/gem/ruby/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:164:in get_file_list_by_timestamp' from /home/user/.local/share/gem/ruby/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:309:in file_list_by_timestamp'
from /home/user/.local/share/gem/ruby/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:192:in download_files' from /home/user/.local/share/gem/ruby/gems/wayback_machine_downloader-2.3.1/bin/wayback_machine_downloader:72:in <top (required)>'
from /home/user/bin/wayback_machine_downloader:25:in load' from /home/user/bin/wayback_machine_downloader:25:in

'

@intercoop
Copy link

same issue !

@hupictz
Copy link
Author

hupictz commented Oct 6, 2024

Hi Guys,

I found a solution for this.

Use this updated version, and it works.

credits to ShiftaDeband

=========================

  1. Install the required ruby version.

  2. Download zip/clone fork from ShiftaDeband https://github.com/ShiftaDeband/wayback-machine-downloader.

  3. Navigate to wayback-machine-downloader\bin

  4. On Windows, you can launch Power Shell by shift + right-click the empty space in the folder and select Open Power Shell.

  5. From here, you can run the program with ruby wayback_machine_downloader instead of normal wayback_machine_downloader if you installed it as a gem.

You can also uninstall the original nonfunctional gem if you installed it previously with the gem uninstall wayback_machine_downloader

Note: I tried this and its working now (Tested on 6th October 2024)

Don't forget to give star to ShiftaDeband

@hupictz hupictz closed this as completed Oct 6, 2024
@hupictz
Copy link
Author

hupictz commented Oct 6, 2024

If you need more help - check this screenshot.

Screen Shot 2024-10-06 at 1 11 20 PM

@hupictz hupictz reopened this Oct 6, 2024
@intercoop
Copy link

Hi Guys,

I found a solution for this.

Use this updated version, and it works.

credits to ShiftaDeband

=========================

  1. Install the required ruby version.
  2. Download zip/clone fork from ShiftaDeband https://github.com/ShiftaDeband/wayback-machine-downloader.
  3. Navigate to wayback-machine-downloader\bin
  4. On Windows, you can launch Power Shell by shift + right-click the empty space in the folder and select Open Power Shell.
  5. From here, you can run the program with ruby wayback_machine_downloader instead of normal wayback_machine_downloader if you installed it as a gem.

You can also uninstall the original nonfunctional gem if you installed it previously with the gem uninstall wayback_machine_downloader

Note: I tried this and its working now (Tested on 6th October 2024)

Don't forget to give star to ShiftaDeband

Thanks hupictz,But it doesn't work for me

@Jacek216
Copy link

Jacek216 commented Oct 6, 2024

If you need more help - check this screenshot.

Hi! It really works like on your screenshot, thanks for help!
But the site opens in wrong format, not like in web.archive.org, do you have the same problem?
screen

@Jacek216
Copy link

Jacek216 commented Oct 6, 2024

Thanks hupictz,But it doesn't work for me

use these commands for Windows PowerShell, after installing ruby and downloading wayback-machine-downloader:
cd downloads
cd wayback-machine-downloader-feature-httpGet
cd bin
ruby wayback_machine_downloader example.com --from 20220331

@intercoop
Copy link

Thanks hupictz,But it doesn't work for me

use these commands for Windows PowerShell, after installing ruby and downloading wayback-machine-downloader: cd downloads cd wayback-machine-downloader-feature-httpGet cd bin ruby wayback_machine_downloader example.com --from 20220331

Thank you very much, it has taken effect !

@Jacek216
Copy link

Jacek216 commented Oct 6, 2024

Thank you very much, it has taken effect !

Nice! Your site opens correctly as shown on web.archive.org? or you have the same problem after moving the downloading files to your remote site, like on my previous screenshot?

@intercoop
Copy link

Thank you very much, it has taken effect !

Nice! Your site opens correctly as shown on web.archive.org? or you have the same problem after moving the downloading files to your remote site, like on my previous screenshot?

It only contains HTML files,Do not download CSS and image files,I can't find the reason why this situation is happening

@Jacek216
Copy link

Jacek216 commented Oct 6, 2024

It only contains HTML files,Do not download CSS and image files,I can't find the reason why this situation is happening

Yes, the same with different sites

P.S. everything is okey now, depends on site

@hupictz
Copy link
Author

hupictz commented Oct 6, 2024

Thank you very much, it has taken effect !

Nice! Your site opens correctly as shown on web.archive.org? or you have the same problem after moving the downloading files to your remote site, like on my previous screenshot?

It only contains HTML files,Do not download CSS and image files,I can't find the reason why this situation is happening

@intercoop I am able to download all types of files.

.png, .css, .js, .gif etc

check this screenshot

Screen Shot 2024-10-06 at 7 09 28 PM

@SofiaEngvall
Copy link

Here is my error message from kali linux:

┌──(kali㉿kali)-[~]
└─$ wayback_machine_downloader https://digistump.com/wiki/digispark -p 500 -c 5
Downloading https://digistump.com/wiki/digispark to websites/digistump.com/ from Wayback Machine archives.

Getting snapshot pages.............../usr/lib/ruby/3.1.0/open-uri.rb:364:in `open_http': 400 BAD REQUEST (OpenURI::HTTPError)
        from /usr/lib/ruby/3.1.0/open-uri.rb:741:in `buffer_open'
        from /usr/lib/ruby/3.1.0/open-uri.rb:212:in `block in open_loop'
        from /usr/lib/ruby/3.1.0/open-uri.rb:210:in `catch'
        from /usr/lib/ruby/3.1.0/open-uri.rb:210:in `open_loop'
        from /usr/lib/ruby/3.1.0/open-uri.rb:151:in `open_uri'
        from /usr/lib/ruby/3.1.0/open-uri.rb:721:in `open'
        from /var/lib/gems/3.1.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader/archive_api.rb:13:in `get_raw_list_from_api'
        from /var/lib/gems/3.1.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:92:in `block in get_all_snapshots_to_consider'
        from /var/lib/gems/3.1.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:91:in `times'
        from /var/lib/gems/3.1.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:91:in `get_all_snapshots_to_consider'
        from /var/lib/gems/3.1.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:105:in `get_file_list_curated'
        from /var/lib/gems/3.1.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:164:in `get_file_list_by_timestamp'
        from /var/lib/gems/3.1.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:309:in `file_list_by_timestamp'
        from /var/lib/gems/3.1.0/gems/wayback_machine_downloader-2.3.1/lib/wayback_machine_downloader.rb:192:in `download_files'
        from /var/lib/gems/3.1.0/gems/wayback_machine_downloader-2.3.1/bin/wayback_machine_downloader:72:in `<top (required)>'
        from /usr/local/bin/wayback_machine_downloader:25:in `load'
        from /usr/local/bin/wayback_machine_downloader:25:in `<main>'

I'll look at the fork. Thanks!

@hupictz
Copy link
Author

hupictz commented Oct 7, 2024

If you need more help - check this screenshot.

Hi! It really works like on your screenshot, thanks for help! But the site opens in wrong format, not like in web.archive.org, do you have the same problem? screen

@Jacek216 No, for me, it works fine. I am not facing any issues.

@vachi
Copy link

vachi commented Oct 7, 2024

Also worked for me thank you @hupictz

Hi Guys,

I found a solution for this.

Use this updated version, and it works.

credits to ShiftaDeband

=========================

  1. Install the required ruby version.
  2. Download zip/clone fork from ShiftaDeband https://github.com/ShiftaDeband/wayback-machine-downloader.
  3. Navigate to wayback-machine-downloader\bin
  4. On Windows, you can launch Power Shell by shift + right-click the empty space in the folder and select Open Power Shell.
  5. From here, you can run the program with ruby wayback_machine_downloader instead of normal wayback_machine_downloader if you installed it as a gem.

You can also uninstall the original nonfunctional gem if you installed it previously with the gem uninstall wayback_machine_downloader

Note: I tried this and its working now (Tested on 6th October 2024)

Don't forget to give star to ShiftaDeband

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants