Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
XPath vs CSS Selector | CSS Selectors/XPaths
Web Scraping with Python (res)
course content

Conteúdo do Curso

Web Scraping with Python (res)

Web Scraping with Python (res)

1. HTML Files and DevTools
2. Beautiful Soup
3. CSS Selectors/XPaths
4. Tables

bookXPath vs CSS Selector

So, where is it appropriate to use XPath or CSS Selector?

As a good rule, use CSS Selectors for simple queries based on the element's attributes. CSS Selectors perform better and faster than XPath in most browsers. However, to overcome the impossibility of querying content with CSS Selectors, use XPath for more complex queries. In most cases, use what is more comfortable for you.

1. What’s the difference between XPath and CSS Selector?
2. Choose CSS Selector equal to the following XPath:
What’s the difference between XPath and CSS Selector?

What’s the difference between XPath and CSS Selector?

Selecione algumas respostas corretas

Choose CSS Selector equal to the following XPath:

Choose CSS Selector equal to the following XPath:

Selecione a resposta correta

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 6
some-alt