• Stars
    star
    119
  • Rank 297,930 (Top 6 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created about 5 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Page Object pattern for Scrapy

scrapy-poet

PyPI Version Supported Python Versions Build Status Coverage report Documentation Status

scrapy-poet is the web-poet Page Object pattern implementation for Scrapy. scrapy-poet allows to write spiders where extraction logic is separated from the crawling one. With scrapy-poet is possible to make a single spider that supports many sites with different layouts.

Read the documentation for more information.

License is BSD 3-clause.

Quick Start

Installation

pip install scrapy-poet

Requires Python 3.8+ and Scrapy >= 2.6.0.

Usage in a Scrapy Project

Add the following inside Scrapy's settings.py file:

DOWNLOADER_MIDDLEWARES = {
    "scrapy_poet.InjectionMiddleware": 543,
}
SPIDER_MIDDLEWARES = {
    "scrapy_poet.RetryMiddleware": 275,
}

Developing

Setup your local Python environment via:

  1. pip install -r requirements-dev.txt
  2. pre-commit install

Now everytime you perform a git commit, these tools will run against the staged files:

  • black
  • isort
  • flake8

You can also directly invoke pre-commit run --all-files or tox -e linters to run them without performing a commit.

More Repositories

1

portia

Visual scraping for Scrapy
Python
8,991
star
2

splash

Lightweight, scriptable browser as a service with an HTTP API
Python
3,898
star
3

dateparser

python parser for human readable dates
Python
2,525
star
4

frontera

A scalable frontier for web crawlers
Python
1,288
star
5

slackbot

A chat bot for Slack (https://slack.com).
Python
1,263
star
6

extruct

Extract embedded metadata from HTML markup
Python
832
star
7

scrapyrt

HTTP API for Scrapy spiders
Python
829
star
8

python-crfsuite

A python binding for crfsuite
Python
770
star
9

spidermon

Scrapy Extension for monitoring spiders execution.
Python
530
star
10

price-parser

Extract price amount and currency symbol from a raw text string
Python
307
star
11

article-extraction-benchmark

Article extraction benchmark: dataset and evaluation scripts
Python
268
star
12

webstruct

NER toolkit for HTML data
HTML
252
star
13

python-scrapinghub

A client interface for Scrapinghub's API
Python
195
star
14

adblockparser

Python parser for Adblock Plus filters
Python
187
star
15

js2xml

Convert Javascript code to an XML document
Python
186
star
16

testspiders

Useful test spiders for Scrapy
Python
183
star
17

scrapy-training

Scrapy Training companion code
Python
171
star
18

skinfer

Skinfer is a tool for inferring and merging JSON schemas
Python
140
star
19

sample-projects

Sample projects showcasing Scrapinghub tech
Python
137
star
20

shub

Scrapinghub Command Line Client
Python
125
star
21

python-simhash

An efficient simhash implementation for python
C
122
star
22

number-parser

Parse numbers written in natural language
Python
108
star
23

mdr

A python library detect and extract listing data from HTML page.
C
106
star
24

web-poet

Web scraping Page Objects core library
Python
95
star
25

aile

Automatic Item List Extraction
HTML
87
star
26

wappalyzer-python

UNMAINTAINED Python wrapper for Wappalyzer (utility that uncovers the technologies used on websites)
Python
82
star
27

pydepta

A python implementation of DEPTA
C
80
star
28

scrapinghub-stack-scrapy

Software stack with latest Scrapy and updated deps
Dockerfile
60
star
29

aduana

Frontera backend to guide a crawl using PageRank, HITS or other ranking algorithms based on the link structure of the web graph, even when making big crawls (one billion pages).
C
55
star
30

scrapy-autoextract

Zyte Automatic Extraction integration for Scrapy
Python
55
star
31

scrapy-autounit

Automatic unit test generation for Scrapy.
Python
55
star
32

learn.scrapinghub.com

Scrapinghub Learning Center. Report issues in Jira: Report issues in Jira: https://scrapinghub.atlassian.net/projects/WEB
CSS
55
star
33

portia2code

Python
49
star
34

arche

Analyze scraped data
Python
47
star
35

scmongo

MongoDB extensions for Scrapy
Python
44
star
36

exporters

Exporters is an extensible export pipeline library that supports filter, transform and several sources and destinations
Python
40
star
37

webpager

Paginating the web
C
35
star
38

scrapy-frontera

More flexible and featured Frontera scheduler for Scrapy
Python
35
star
39

page_clustering

A simple algorithm for clustering web pages, suitable for crawlers
HTML
34
star
40

flatson

Tool to flatten stream of JSON-like objects, configured via schema
Python
33
star
41

scaws

Extensions for using Scrapy on Amazon AWS
Python
32
star
42

docker-images

Dockerfile
32
star
43

scrapylib

Collection of Scrapy utilities (extensions, middlewares, pipelines, etc)
Python
31
star
44

pycon-speakers

Speakers Spider (PyCon 2014 sprint)
Python
30
star
45

docker-devpi

pypi caching service using devpi and docker
Shell
28
star
46

crawlera-tools

Crawlera tools
Python
26
star
47

scrapinghub-entrypoint-scrapy

Scrapy entrypoint for Scrapinghub job runner
Python
25
star
48

scrapy-mosquitera

Restrict crawl and scraping scope using matchers.
Python
25
star
49

andi

Library for annotation-based dependency injection
Python
20
star
50

kafka-scanner

High Level Kafka Scanner
Python
19
star
51

autoextract-spiders

Pre-built Scrapy spiders for AutoExtract
Python
19
star
52

python-cld2

Python bindings for CLD2.
Python
17
star
53

product-extraction-benchmark

Jupyter Notebook
16
star
54

python-hubstorage

Deprecated HubStorage client library - please use python-scrapinghub>=1.9.0 instead
Python
16
star
55

shublang

Pluggable DSL that uses pipes to perform a series of linear transformations to extract data
Python
15
star
56

shub-workflow

Python
13
star
57

shubc

Go bindings for Scrapinghub HTTP API and a sweet command line tool for Scrapy Cloud
Go
13
star
58

scrapinghub-stack-portia

Software stack used to run Portia spiders in Scrapinghub cloud
Python
10
star
59

tutorials

Python
8
star
60

pastebin

Python
8
star
61

navscraper

Vanguard ETF NAV scraper
Python
8
star
62

varanus

A command line spider monitoring tool
Python
8
star
63

hcf-backend

Crawl Frontier HCF backend
Python
7
star
64

pydatanyc

Python
7
star
65

autoextract-poet

web-poet definitions for AutoExtract
Python
6
star
66

collection-scanner

HubStorage collection scanner library
Python
5
star
67

locode

Python
5
star
68

adblockgoparser

Golang parser for Adblock Plus filters
Go
4
star
69

autoextract-examples

Jupyter Notebook
4
star
70

webstruct-demo

HTTP demo for https://github.com/scrapinghub/webstruct
Python
4
star
71

shub-image

Deprecated client side tool to prepare docker images to run crawlers in Scrapinghub - please use shub>=2.5.0 instead
Python
4
star
72

docker-cloudera-manager

Run Cloudera Manager in docker
Dockerfile
3
star
73

custom-images-examples

Examples of custom images running on Scrapinghub platform
3
star
74

hubstorage-frontera

Hubstorage crawl frontier backend for Frontera
Python
3
star
75

httpation

Erlang
3
star
76

xpathcsstutorial

[Work in progress] XPath & CSS for web scraping tutorial
Jupyter Notebook
3
star
77

epmdless_dist

Erlang
2
star
78

egraylog

Erlang
2
star
79

scrapinghub-conda-recipes

Conda packages for scrapinghub channel
Shell
2
star
80

pydaybot

Demo bot for Python Day Uruguay 2011
Python
2
star
81

erl-iputils

Erlang
1
star
82

jupyterhub-stacks

A docker images for jhub cluster
Python
1
star
83

cld2

Compact Language Detector 2
C++
1
star
84

scrapinghub-stack-hworker

[DEPRECATED] Software stack fully compatible with Scrapy Cloud 1.0
Python
1
star
85

crawlera.com

crawlera.com website
HTML
1
star
86

discourse-sso-google

Use Google as Single-Sign-On provider for Discourse
Python
1
star
87

pkg-opengrok

Ubuntu packaging for OpenGrok
Shell
1
star