Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Q1) What do I need to do to get this script working?

I've realized looking at this WWW::Mechanize how old in internet years this is now (now is 18-04-2020). I couldn't figure out just when it hit the scene, but I did find a treatment of it at this link from 2002. They have the similar treatment of imdb, but the site has changed completely since then. I was furthered impressed by its burgeoning age by this:

my %known_agents = ( 'Windows IE 6' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows + NT 5.1)',

Over the last several days, I've read up about the Browser_wars, and I guess I was there for it, but just not really aware that chrome had displaced IE as the most popular browser. Now I see that chrome and firefox are leading the field, so lucky for us perlers that we have some tools so as to not have to toss our hands up and say that we can't deal with javascript-enabled sites, which seems to be a lot of them as I was poking around again. The imdb site was javascript-enabled, so the script in the original post is poorly suited to that module, at least now.

Q4) Doesn't "scraping" connote going after an entire class of files like images, or have I done it here without even trying?

I think one obviates this by logging in:

# get login data for using Config::Tiny use Config::Tiny; my $ini_path = qw( /home/hogan/Documents/html_template_data/3.values +.ini ); say "ini path is $ini_path"; my $sub_hash = "perlmonks"; my $Config = Config::Tiny->new; $Config = Config::Tiny->read( $ini_path, 'utf8' ); my $username = $Config->{$sub_hash}{'username'}; my $password = $Config->{$sub_hash}{'password'}; say "values are $username $password ";

If the site doesn't like what your script is doing when you're signed in, they can let you know. I really would like to work up this example, but with WMC instead. My partner and I will watch Netflix, HBO, Amazon, and we're always trying to match the actors up to where we've seen them last, so I will get on my android and make the actual keystrokes on other occasions.

So I would like to have something I could work up to launch on android, but with WMC, which should have the advantages of being on a native platform.


In reply to Re: running an example script with WWW::Mechanize* module by Aldebaran
in thread running an example script with WWW::Mechanize* module by Aldebaran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (2)
    As of 2021-01-19 03:02 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Notices?