I'm trying to download KeyForge images from the official site with a Perl program. Here is what I got:
use 5.010; use strict; use warnings; use LWP::UserAgent; my $url = "https://cdn.keyforgegame.com/media/card_front/en/341_1_7C85 +4VPW72RH_en.png"; my $ua = LWP::UserAgent->new(agent => ''); my $response = $ua->get($url); die $response->status_line if not $response->is_success; my $data = $response->content; say $data;
Then I start the program with:
perl test.pl > test.pngThe resulting file can't unfortunately be opened by applications (error: bad format). I tried to diff my file with the one downloaded with a browser and it shows 8 differences. I'm not used to diff binary files but it seems maybe there's a CRLF conversion somewhere. I'm on Windows by the way.
Could someone help me?
In reply to Downloading KeyForge image by Stamm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |