charlotte
Lightweight and expandable spider framework.
Install
pip install charlotte
Example
import json
import asyncio
from charlotte.spider import BaseSpider
class Spider(BaseSpider):
async def on_start(self):
response = await self.fetch('https://blog.qiaohong.org/api/v1/articles')
items = json.loads(response.body)
await asyncio.wait(
[self.fetch('https://blog.qiaohong.org/api/v1/articles/' + item['slug'],
parser=self.parse_detail) for item in items['data']['articles']])
def parse_detail(self, res):
print(res.body.decode('utf-8'))
if __name__ == '__main__':
Spider().run()
Documentation
Check wiki for details.
LICENSE
MIT
Metadata
Release files for charlotte 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| charlotte-0.2.4.tar.gz | 5.2 kB | Without provenance | Details for charlotte-0.2.4.tar.gz |
Release files / charlotte-0.2.4.tar.gz
| Download URL | charlotte-0.2.4.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34a9198246374f12a1d03708cb1bdab177577a084855d3bedcc876862c518cb7
|
|
BLAKE2b-256 checksum How to use checksums |
ed0f2e07981f24da2ed7de2979a8f9ffe9c9d6350536cd255cc95dfdb24accc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Security for charlotte 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.