Commit Graph

2 Commits

Author SHA1 Message Date
Roman Yurchak 67eab0c082
MNT update pure python packages (#745) 2020-10-17 09:07:19 +02:00
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