Name | spidar JSON |
Version |
0.0.1
JSON |
| download |
home_page | None |
Summary | Web Scraping library |
upload_time | 2024-06-13 06:13:06 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.6.0 |
license | MIT License |
keywords |
html
xml
parse
soup
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Spidar is a library that makes it easy to scrape information
from web pages. It sits atop an HTML or XML parser, providing Pythonic
idioms for iterating, searching, and modifying the parse tree.
# Quick start
```
>>> from spidar import Spidar
html_content = '<html><body><p>Some<b>bad<i>HTML</i></b></p></body></html>'
>>> sp = Spidar(html_content, 'html.parser')
>>> print(sp.prettify())
<html>
<body>
<p>
Some
<b>
bad
<i>
HTML
</i>
</b>
</p>
</body>
</html>
>>> sp.find(text="bad")
'bad'
>>> sp.i
<i>HTML</i>
#
>>> sp = Spidar("<p>Some<b>bad<i>HTML")
#
>>> print(sp.prettify())
<html>
<body>
<p>
Some
<b>
bad
<i>
HTML
</i>
</b>
</p>
</body>
</html>
#
>>> sp = Spidar("<tag1>Some<tag2/>bad<tag3>XML", "xml")
#
>>> print(sp.prettify())
<?xml version="1.0" encoding="utf-8"?>
<tag1>
Some
<tag2/>
bad
<tag3>
XML
</tag3>
</tag1>
```
# Running the unit tests
Spidar supports unit test discovery using Pytest:
```
$ pytest
```
Raw data
{
"_id": null,
"home_page": null,
"name": "spidar",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6.0",
"maintainer_email": null,
"keywords": "HTML, XML, parse, soup",
"author": null,
"author_email": "Shariful Alam <2ashariful@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/25/f7/13bdc89560ed5994a1cabb8d04196c3150628e8ade81d0467908e71a5f64/spidar-0.0.1.tar.gz",
"platform": null,
"description": "Spidar is a library that makes it easy to scrape information\nfrom web pages. It sits atop an HTML or XML parser, providing Pythonic\nidioms for iterating, searching, and modifying the parse tree.\n\n# Quick start\n\n```\n>>> from spidar import Spidar\nhtml_content = '<html><body><p>Some<b>bad<i>HTML</i></b></p></body></html>'\n>>> sp = Spidar(html_content, 'html.parser')\n>>> print(sp.prettify())\n<html>\n <body>\n <p>\n Some\n <b>\n bad\n <i>\n HTML\n </i>\n </b>\n </p>\n </body>\n</html>\n>>> sp.find(text=\"bad\")\n'bad'\n>>> sp.i\n<i>HTML</i>\n#\n>>> sp = Spidar(\"<p>Some<b>bad<i>HTML\")\n#\n>>> print(sp.prettify())\n<html>\n <body>\n <p>\n Some\n <b>\n bad\n <i>\n HTML\n </i>\n </b>\n </p>\n </body>\n</html>\n#\n>>> sp = Spidar(\"<tag1>Some<tag2/>bad<tag3>XML\", \"xml\")\n#\n>>> print(sp.prettify())\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<tag1>\n Some\n <tag2/>\n bad\n <tag3>\n XML\n </tag3>\n</tag1>\n```\n\n\n# Running the unit tests\n\nSpidar supports unit test discovery using Pytest:\n\n```\n$ pytest\n```\n\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Web Scraping library",
"version": "0.0.1",
"project_urls": {
"Download": "https://github.com/shari-ful/spidar.git",
"Homepage": "https://github.com/shari-ful/spidar.git"
},
"split_keywords": [
"html",
" xml",
" parse",
" soup"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "70cab9626deb56b940b23b213aa5464ab0e39c5ac53bf4b17b4e7e2b0f3951a1",
"md5": "651e4ccc90b090cc813273870cb2885a",
"sha256": "91fc3bc9c541444c4948c1bf34aa5af8cf5ae4a64e19370e429e1f2d8460f897"
},
"downloads": -1,
"filename": "spidar-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "651e4ccc90b090cc813273870cb2885a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6.0",
"size": 145484,
"upload_time": "2024-06-13T06:13:03",
"upload_time_iso_8601": "2024-06-13T06:13:03.255537Z",
"url": "https://files.pythonhosted.org/packages/70/ca/b9626deb56b940b23b213aa5464ab0e39c5ac53bf4b17b4e7e2b0f3951a1/spidar-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "25f713bdc89560ed5994a1cabb8d04196c3150628e8ade81d0467908e71a5f64",
"md5": "ac653b6d597bf5c512ba6e087e5df6b1",
"sha256": "76f195101a08a781efc59cf4c384efca5d4f273f0258b3794fd6f8c940b2fe45"
},
"downloads": -1,
"filename": "spidar-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "ac653b6d597bf5c512ba6e087e5df6b1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6.0",
"size": 123969,
"upload_time": "2024-06-13T06:13:06",
"upload_time_iso_8601": "2024-06-13T06:13:06.434996Z",
"url": "https://files.pythonhosted.org/packages/25/f7/13bdc89560ed5994a1cabb8d04196c3150628e8ade81d0467908e71a5f64/spidar-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-13 06:13:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "shari-ful",
"github_project": "spidar",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "spidar"
}