preferences['google_domain'] . '' . $matches[1];
21 | return htmlspecialchars_decode($url);
22 | }
23 |
24 | return false;
25 | }
26 |
27 | private function decodeLink($link)
28 | {
29 | if (preg_match('/\\/url\\?q=(.*?)&/', $link, $matches) == 1) {
30 | $link = $matches[1];
31 | } else if (preg_match('/interstitial\\?url=(.*?)&/', $link, $matches) == 1) {
32 | $link = $matches[1];
33 | }
34 |
35 | $link = htmlspecialchars_decode($link);
36 |
37 | return rawurldecode($link);
38 | }
39 |
40 | private function extractResults($raw_html)
41 | {
42 | // TODO: maybe do it in blocks? extract result blocks first? |