Я бы сделал в браузере расширением. Будет удобней каптчу преодолевать. Вот код который парсит выдачу Code: // Script for inject to google page. // This script finds links (anchros html elements) and returns them to the background script. // Out: // { // query: "query text", // hrefs: [ // "http://host1/path", // "http://host2/path", // ... // "http://hostN/path", // ], // relaited: [ // "relaited query text 0", // "relaited query text 1", // ... // "relaited query text N" // ] // } var result = null; var anchors = { getSearchQuery: function() { var URLObj = new URL(document.location); var params = URLObj.searchParams; var query = params.get('q'); return query; }, getSearchResultAnchors: function() { var A = null; A = document.getElementsByTagName("a"); var id, len = A.length; var res = []; for(id = 0; id < len; id++) { var a = A[id]; if (this.isEnabledChildTags(a, ["H3", "BR", "DIV"])) res.push(a); } return res; }, isEnabledChildTags: function(node, tagNames) { var cnt = 0; var id, len = node.childNodes.length; for (id = 0; id < len; id++) { var childNode = node.childNodes[id]; if (childNode.tagName == tagNames[cnt]) { cnt += 1; if (cnt == tagNames.length) return true; } } return false; }, getRelaitedAnchors: function() { var A = null; A = document.getElementsByTagName("a"); var id, len = A.length; var res = []; for(id = 0; id < len; id++) { if (A[id].parentNode.tagName == "P") res.push(A[id]); } return res; }, get: function() { var res = { query: "", hrefs: [], relaited: [] }; res.query = this.getSearchQuery(); var A = this.getSearchResultAnchors(); var id, len = A.length; for(id = 0; id < len; id++) { res.hrefs.push(A[id].href); } var A = this.getRelaitedAnchors(); var id, len = A.length; for(id = 0; id < len; id++) { res.relaited.push(A[id].innerText); } return res; } }; result = anchors.get(); Можно использовать режим headless