I'm working on this script that grabs a web page from a foreign site, searches it for specific information, and grabs web pages from links on the original page. Once I had it working, I tried it out on the foreign site. However, the information I got back was nonsensical. I'm guessing the code I get back from the web page is written in that foreign language, but when I [view]->[page source] of the same page, it looks like normal html code.
Does anyone know what is happening here or how to fix it?
Here is my script:
-
use strict;
-
use WWW::Mechanize;
-
-
my $mech = WWW::Mechanize->new();
-
my $page = $mech->get('http://russia.ru');
-
-
print $page->content;
-
Here is what the page looks like when I view the source code from my browser:
Here is what html code is returned after the script is run:
I hope I've provided adequate information. Thank you for all of your help.