Yes, it is entirely possible. I took the code above from the authors blog post. It is hard to find examples of a working Scrappy script. But as of now I am using:
in reply to Re^3: Scrappy user_agent error
in thread Scrappy user_agent error
And CPANs Module Version: 0.94112090 docs from:
The user_agent attribute holds the Scrappy::Scraper::UserAgent object which is used to set and manipulate the user-agent header of the scraper.
So in that context, how would I set the user_agent correctly to be firefox using Scrappy 0.94112090? There used to be way. Maybe it was removed. I seem to be missing the entire picture somehow :)
my $scraper = Scrappy->new;