The fastest web crawler written in Rust ported to nodejs.
Project description
spider-py
The spider project ported to Python.
Getting Started
pip install spider_rs
import asyncio
from spider_rs import crawl
async def main():
website = await crawl("https://choosealicense.com")
print(website.links)
# print(website.pages)
asyncio.run(main())
Use the Website class to build the crawler you need.
import asyncio
from spider_rs import Website
async def main():
website = Website("https://choosealicense.com", False).with_headers({ "authorization": "myjwttoken" })
website.crawl()
print(website.get_links())
asyncio.run(main())
Setting up real time subscriptions can be done too.
import asyncio
from spider_rs import Website
class Subscription:
def __init__(self):
print("Subscription Created...")
def __call__(self, page):
print(page.url + " - status: " + str(page.status_code))
async def main():
website = Website("https://choosealicense.com", False)
website.crawl(Subscription())
asyncio.run(main())
Development
Install maturin pipx install maturin
and python.
maturin develop
Benchmarks
View bench to see the results.
Issues
Please submit a Github issue for any issues found.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spider_rs-0.0.11.tar.gz
(30.5 kB
view hashes)
Built Distribution
Close
Hashes for spider_rs-0.0.11-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b013e24330a2950fcb5e078ed62022b225d4e952704eccc587d4b3b54c14094c |
|
MD5 | 72f9d55d96b3fe7747206b35c27cf7fc |
|
BLAKE2b-256 | 934c3901b40212bc2125a4ce94fef6831d4e4bf1d614e4749f1b3570cb4fcc41 |