DEV Community

Discussion on: Scrape Bing Videos with Python

Collapse
silanoa profile image
Rosalex A.

Hi good job but i wanted to ask you why you prefer select to find with beautifulsoup ? Select is more advantageous ?

Collapse
dimitryzub profile image
Dimitry Zub Author • Edited

Hey, Rosalex!

  1. When chaining tags, elements, .select()/.select_one() methods are more readable. For example if you want to chain the following selectors with .find()/.find_all() methods it would look not very readable: soup.select("div[id=foo] > div > div > div[class=fee] > span > span > a"
  2. CSS selectors are more efficient in terms of speed.
  3. It's a personal preference.

You can read more about CSS selectors on bs4 documentation and on soupsieve documentation which is CSS selector library designed to be used with Beautiful Soup.

In short, I just used to using them :)

--- D.

Collapse
silanoa profile image
Rosalex A.

Ok I understand better thank you for this explanation
Without transition I would like to know if there exists on python a module like pytrends for bing which allows to find the popularity of a word

Thread Thread
dimitryzub profile image
Dimitry Zub Author • Edited

The short answer is I don't know. Haven't seen anything like this for Bing anywhere.

Since Bing Toolbox is the only option I see at the moment which requires sing-ups and all sorts of other stuff which Google Trends doesn't require, it becomes a much harder process.

D.

Thread Thread
silanoa profile image
Rosalex A.

Ok thanks