Skip navigation.
Home
Personalize your internet.

Codes for different Search Engines

Only codes for Google are known at this time. Sorry!

  • Google
    Regular Expression for detecting search page URL:
    ^http://www.google..*?/search\?.*q=(.*)&.*$
    XPath to search result nodes:
    //*[@class='g' and not(//p[class='g'])]
    XPath to URL-contianing element within search result:
    descendant::a/@href
    Regular Expression to URL within Xpath result:
    &q=(.*?)&e=

Nerds: If you figure out the XPATH and RegExps for other search engines, please use the contact link to email me and I'll add it to this page.