File: spider4.py

package info (click to toggle)
python-scrapy 1.5.1-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,404 kB
  • sloc: python: 25,793; xml: 199; makefile: 95; sh: 33
file content (9 lines) | stat: -rw-r--r-- 234 bytes parent folder | download
1
2
3
4
5
6
7
8
9
from scrapy.spiders import Spider

class Spider4(Spider):
    name = "spider4"
    allowed_domains = ['spider4.com']

    @classmethod
    def handles_request(cls, request):
        return request.url == 'http://spider4.com/onlythis'