Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python's equivalent to Javascript's jQuery or Node's cheerio? [closed]

I'm looking for a library that has a similar API and usage as jQuery or Cheerio.

My use case is: parsing an HTML file for any script or link tags containing javascript/css file references.

like image 539
commadelimited Avatar asked Mar 21 '13 23:03

commadelimited


People also ask

Does Cheerio use JQuery?

💡 Cheerio uses jQuery selector syntax. To learn more about this syntax, see jQuery's selectors documentation.

What is Cheerio used for?

Cheerio is a tool for parsing HTML and XML in Node. js, and is very popular with over 23k stars on GitHub. It is fast, flexible, and easy to use. Since it implements a subset of JQuery, it's easy to start using Cheerio if you're already familiar with JQuery.

Can Cheerio run in browser?

Cheerio is not a web browser It does not interpret the result as a web browser does. Specifically, it does not produce a visual rendering, apply CSS, load external resources, or execute JavaScript which is common for a SPA (single page application). This makes Cheerio much, much faster than other solutions.

What is Python pass in JavaScript?

Python pass Statement The pass statement is used as a placeholder for future code. When the pass statement is executed, nothing happens, but you avoid getting an error when empty code is not allowed.


1 Answers

Python equivalent for jQuery is pyQuery. Under that link you can find usage examples. You can also visit PyQuery on GitHub.

like image 152
Krzysiek Grzembski Avatar answered Sep 21 '22 14:09

Krzysiek Grzembski