A Simple Distributed Web Crawle
Project description
simplified-scrapy
simplified scrapy, A Simple Web Crawle
Requirements
- Python 2.7, 3.0+
- Works on Linux, Windows, Mac OSX, BSD
run
from simplified_scrapy.simplified_main import SimplifiedMain
SimplifiedMain.startThread()
Demo
Custom crawler class needs to extend Spider class
from core.spider import Spider
class DemoSpider(Spider):
Here is an example of collecting data
from simplified_scrapy.spider import Spider, SimplifiedDoc
class DemoSpider(Spider):
name = 'demo-spider'
start_urls = ['http://quotes.toscrape.com/']
allowed_domains = ['quotes.toscrape.com']
def extract(self, url, html, models, modelNames):
doc = SimplifiedDoc(html)
lstA = doc.listA(url=url["url"])
return [{"Urls": lstA, "Data": None}]
from simplified_scrapy.simplified_main import SimplifiedMain
SimplifiedMain.startThread(DemoSpider())
pip install
pip install simplified-scrapy
Legal Issues
In particular, please be aware that
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Translated to human words:
In case your use of the software forms the basis of copyright infringement, or you use the software for any other illegal purposes, the authors cannot take any responsibility for you.
We only ship the code here, and how you are going to use it is left to your own discretion.
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
File details
Details for the file simplified_scrapy-1.5.165.tar.gz
.
File metadata
- Download URL: simplified_scrapy-1.5.165.tar.gz
- Upload date:
- Size: 43.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a7b3f82a83c39e79a15288a1b6181168ca0a1980de2cded519243278191eed5 |
|
MD5 | 1515b95aa9dd237b4f88365768d7297f |
|
BLAKE2b-256 | 5d17254aea0592498adc4d05b3ec9e8e27edbe803395bd55330385bba8096277 |