Commit Graph

1 Commits

Author SHA1 Message Date
Marc Abramowitz c4e1a4140a Add beautifulsoup4 (w/ soupsieve)
Example:

If you do:

```js
languagePluginLoader.then(() => {
  // pyodide is now ready to use...
  pyodide.loadPackage('beautifulsoup4').then(() => {
    pyodide.runPython(`
text = """
<div>
  <!-- These are animals -->
  <p class="a">Cat</p>
  <p class="b">Dog</p>
  <p class="c">Mouse</p>
</div>
"""

from bs4 import BeautifulSoup
import soupsieve
soup = BeautifulSoup(text, 'html.parser')

print(soup.select('p:is(.a, .c)'))
    `);
  });
});
```

then the output is:

```
[<p class="a">Cat</p>, <p class="c">Mouse</p>]
```
2019-03-15 14:49:58 -07:00