bachoA4o has asked for the wisdom of the Perl Monks concerning the following question:

Hello , I'm making simple scraper that follows JavaScript generated links. I was reading for WWW::Scripter but could not manage to use it (I'm still newbie in perl ). I want to to scrape the links of the web page and follow a given link then download the page and so on. My progression until now : I'm able to download the HTML and all the links of a given page with WWW::Mechanize. I`ll be glad if someone write some sample code and give a some explanation for the WWW::Scripter module

Replies are listed 'Best First'.
Re: Follow JavaScript link
by Anonymous Monk on Oct 17, 2018 at 20:22 UTC

      Note that WWW::Mechanize::Firefox only works with versions of Firefox before version 54, as Mozilla removed the capability for the old extension mechanism back then. WWW::Mechanize::PhantomJs still works, but PhantomJs itself stopped development.

      WWW::Mechanize::Chrome is currently the only module that uses a supported browser version. Microsoft Edge uses the same protocol for automating the browser, but has a much more limited API. In teh future, maybe we can drive more than one browser using the same wire protocol.

      Hopefully, Mozilla will implement the Chrome Developer Tools protocol as well some day. Then, WWW::Mechanize::Firefox can be revived.

      Disclaimer: I'm the author of both modules.

Re: Follow JavaScript link
by 3dbc (Monk) on Oct 17, 2018 at 20:19 UTC
    ...this may already have your solution
    - 3dbc
      Thanks for the answers but I cant use it for JavaScript I think .I can follow links with Mechanize. but could not manage to do it with with WWW::Scripter for the JS links .