NikolaiT / GoogleScraper

A Python module to scrape several search engines (like Google, Yandex, Bing, Duckduckgo, ...). Including asynchronous networking support.
https://scrapeulous.com/
Apache License 2.0
2.6k stars 734 forks source link

No results for Yandex #217

Closed krawez closed 5 years ago

krawez commented 5 years ago

Yandex results deliver unfortunatelly no results, though it says success

NikolaiT commented 5 years ago

I fixed it in the following commit: https://github.com/NikolaiT/GoogleScraper/commit/40ab7f1e0fcdaabc01f1d79be1991162755803c4

You can specify the CSS selectors for your search engine page in the file parsing.py. For yandex the selectors are now:

    normal_search_selectors = {
        'results': {
            'de_ip': {
                'container': '.serp-list',
                'result_container': '.serp-item',
                'link': 'a.link::attr(href)',
                'snippet': 'div.text-container::text',
                'title': 'div.organic__url-text::text',
                'visible_link': '.typo_type_greenurl::text'
            }
        }
    }