A spider library of several data sources
Project description
DataSpider
A spider framework with several internal spiders.
Install
pip install --upgrade tsingspider
Features
- Light-weight: do not have to start browser simulator, won't cost lots of resources
- But not all the website can download in this way
- Lazy: won't download anything before you actually use the data
- Useful Utilities
- Support HLS download
- Support cookies from firefox
- Support Proxies
- Generate magnet link from torrent data
Write Your Own Spider
To define a resource, you can use LazySoup
or LazyContent
.
LazyContent
is for binary data, basically all kinds of the data are binary.
LazySoup
is for the XML format resource, widely be used for downloading web-page.
For example:
from tsing_spider.util import LazySoup, LazyContent
class YourOwnSpider(LazySoup):
def __init__(self, url:str):
LazySoup.__init__(self, url)
@property
def some_info(self) -> str:
"""
Extract information from self.soup
the data will be downloaded at the first time of using it
"""
pass
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
tsingspider-1.4.2.tar.gz
(19.0 kB
view details)
Built Distribution
File details
Details for the file tsingspider-1.4.2.tar.gz
.
File metadata
- Download URL: tsingspider-1.4.2.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3371f3803ae05845d056cea81b6d38621b34a4d4bd0ac7dac636d4f805ae5992 |
|
MD5 | 159e9b9b5a2983b0da58ed487ac58674 |
|
BLAKE2b-256 | 39cb474649ddd47c56a63887773e98db64d9adf10535392628ce5b58c26a9ffc |
File details
Details for the file tsingspider-1.4.2-py3-none-any.whl
.
File metadata
- Download URL: tsingspider-1.4.2-py3-none-any.whl
- Upload date:
- Size: 36.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d668e865e153262ef17c6484897450bc8b6078ae3a58928b014fd1c75916ad4 |
|
MD5 | 49b43df49958046132bf3fee16658a40 |
|
BLAKE2b-256 | f0304e1d6688bcdc74bc406319a7b8de49682ea11e93645a68d796c89cbdf83b |