I am scraping a website using selenium in python. The xpath is able to find the 20 elements, which contain the search results. However, the content is available only for the first 6 elements, and the rest has empty strings. This is true for all the pages of the results
The xpath used:
results = driver.find_elements_by_xpath("//li[contains(@class, 'search-result search-result__occluded-item ember-view')]")
xpath finds 20 elements in chrome
Text inside the results
[tt.text for tt in results]
anonymized output:
['Abcddwedwada',
'Asefdasdfaca',
'Asdaafcascac',
'Asdadaacjkhi',
'Sfskjfbsfvbkd',
'Fjsbfksjnsvas',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'']
I have tried extracting the id of the 20 elements and used driver.find_element_by_id, but still I get empty strings after the first 6 elements.
