Thanks for the links and the context. At a really quick glimpse the ebook suggests that you host your own WordPress sites locally for testing purposes. From what I've read so far you have an existing WordPress site and are looking to programmatically query some of the associated data from time to time, using it to do something or other. If this is the case, unless you want to work through this whole book, hosting sites locally for test purposes I suggest this is overkill.

Without knowing how much you know I'll mention a few things. The WordPress docs I linked to explain how their REST interface should be used. If you have curl installed you can run their example code for followers (if you have provided authentication details matching their site, rather than the example they provide), and see the response it gives you.

You could scrape this via WWW::Mechanize::Chrome, however it's always better to use an API if one exists, less subject to change, fewer prerequisites, often more portable. So depending on exactly what you want to achieve perl offers lots of ways to solve the problem, including REST::Client, HTTP::Request::FromCurl (this live demo lets you convert a curl request to perl code) and so on.

Take a look, do some reading (Super Search is your friend), let us know if you have specific questions.


In reply to Re^5: Running JavaScript from within Perl by marto
in thread Running JavaScript from within Perl by anautismobserver

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, details, 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, summary, 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.