DEV Community

Discussion on: Scrape Google Recipe Results with Python

Collapse
 
mhihasan profile image
Hasanul Islam

Do you think selecting by css selector is a good idea? Because, it changes frequently.

Collapse
 
dmitryzub profile image
Dmitriy Zub ☀️

Hi @mhihasan, thank you for the comment🙂

It is not a particulary good idea unless you want to fix erros in the parser on regular basis when CSS selector is changed🙂

In case of recipe results, there's no other option to parse data from i.e there's no way to parse data from inline <script> tags or from XHR or other type of request. Only from CSS selectors.

We can can use jscontroller/jsname/jsaction attributes if possible instead since they're changing less frequently or not at all.