Perl: the Markov chain saw | |
PerlMonks |
Getting "raw" jss and css code from server using WWW::Mechanize::Chromeby nysus (Parson) |
on Apr 08, 2019 at 20:07 UTC ( [id://1232316]=perlquestion: print w/replies, xml ) | Need Help?? |
nysus has asked for the wisdom of the Perl Monks concerning the following question: Chromium is injecting HTML tags into css and js files that I am getting with the WWW::Mechanize::Chrome->get() method. Example:
Worse, it is encoding all the downloaded files with html entities. I tried to fix this by decoding the html entities but I'm finding the javascript files don't seem to like that much. I also tried using headless chromium but that didn't help. Is there any way to get the pure, unadulterated css an js files using WWW::Mechanize::Chrome?
UpdatesSo I've tried downloading the files directly to disk with $mech->get($ur, ':content_file' => $file;. Didn't work. I tried $mech->get(format => 'text'). This crashed the browser.
$PM = "Perl Monk's";
Back to
Seekers of Perl Wisdom
|
|