perl surfraw like script
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


psr is a perl script inspired by surfraw. It of course misses a lot of features and supports not nearly as many searches as surfraw does. Its main advantage is the possibility to scrape search results out of the html page, using the very good Web::Scraper. This enables a "I'm feeling lucky" implementation working for all searches and makes it possible to list and use results directly in the shell.


psr is easiest to install with cpanminus:

cpanm --no-lwp --no-wget

If you want to install psr manually you can use the following commands:

wget --no-check-certificate
tar -xzf App-psr-0.4.tar.gz
cd App-psr-0.4
perl Makefile.PL
sudo make install


See the manpage for complete documentation. Some examples:

$ psr -l google test

$ psr -f google test                        #opens in a browser

$ psr google test -o 2-3,5                  #opens the given urls in a browser

$ psr -n 30 -u google test

$ psr -n 30 google test                     #opens in a browser

Todos and Ideas

  • Get more use out of Web::Scraper and the scraping code coming with searches.

    • Add title and/or descriptions of search results to output.
    • etc.