Update XPath for Google engine

This commit is contained in:
Émilien Devos 2022-01-17 21:49:57 +00:00 committed by Noémi Ványi
parent 6ebe9b15a2
commit a2ec27696c
1 changed files with 4 additions and 4 deletions

View File

@ -108,8 +108,8 @@ filter_mapping = {
# specific xpath variables
# ------------------------
# google results are grouped into <div class="g" ../>
results_xpath = '//div[@class="g"]'
# google results are grouped into <div class="g ..." ../>
results_xpath = '//div[contains(@class, "g")]'
# google *sections* are no usual *results*, we ignore them
g_section_with_header = './g-section-with-header'
@ -121,8 +121,8 @@ title_xpath = './/h3[1]'
# href=...>
href_xpath = './/div[@class="yuRUbf"]//a/@href'
# in the result group there is <div class="IsZvec" ../> containing he *content*
content_xpath = './/div[@class="IsZvec"]'
# in the result group there is <div class="VwiC3b ..." ../> containing the *content*
content_xpath = './/div[contains(@class, "VwiC3b")]'
# Suggestions are links placed in a *card-section*, we extract only the text
# from the links not the links itself.