mirror of https://github.com/pyodide/pyodide.git
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>] ```
This commit is contained in:
parent
f5140c8abd
commit
c4e1a4140a
|
@ -0,0 +1,12 @@
|
|||
package:
|
||||
name: beautifulsoup4
|
||||
version: 4.7.1
|
||||
source:
|
||||
sha256: 945065979fb8529dd2f37dbb58f00b661bdbcbebf954f93b32fdf5263ef35348
|
||||
url: https://files.pythonhosted.org/packages/80/f2/f6aca7f1b209bb9a7ef069d68813b091c8c3620642b568dac4eb0e507748/beautifulsoup4-4.7.1.tar.gz
|
||||
requirements:
|
||||
run:
|
||||
- soupsieve
|
||||
test:
|
||||
imports:
|
||||
- bs4
|
|
@ -0,0 +1,9 @@
|
|||
package:
|
||||
name: soupsieve
|
||||
version: '1.8'
|
||||
source:
|
||||
sha256: eaed742b48b1f3e2d45ba6f79401b2ed5dc33b2123dfe216adb90d4bfa0ade26
|
||||
url: https://files.pythonhosted.org/packages/0c/52/e9088bb9b96e2d39fc3b33fcda5b4fde9d71473536ac660a1ca9a0958a2f/soupsieve-1.8.tar.gz
|
||||
test:
|
||||
imports:
|
||||
- soupsieve
|
Loading…
Reference in New Issue