S
S
sc8di2018-03-18 17:45:06
Python
sc8di, 2018-03-18 17:45:06

How to authorize in the Scrapy framework spider before Rules?

How is it possible to authorize on the site before the rules in the CrawlSpider class?
Calling the authorization method via callback does not work.
There should be about 30 pages for the passage when parsing with authorization, and I have 15 at the output.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
drDemon, 2018-09-06
@drDemon

A request is made to the authorization address with the appropriate parameters.
For example:

def start_request():
    yield FormRequest(url=auth_url, callback=self.authorized, .... )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question