Hi all,
I'm tring to login into a phpbb website. If read correctly the documentation, since there is an hidden tag in the login page:
https://www.phpbb.com/community/ucp.php?mode=login

I have to write the start_request and the parse_welcome functions.

Once the login is successfully obtained, I should get a page with the string "private messages" (that is just to be sure that the I'm logged in").

If I print what is in "response" I did not see any "private messages" string, so I'm not sure that I'm doing it right.

The code that I've used in after my signature. May you check it out please?

Thanks in advance,
Massimo


class NonceLoginSpider(CrawlSpider):
    name = 'noncelogin'
    allowed_domains = ["bbcrawler.di.unipmn.it"]

    # Start on the welcome page
    def start_requests(self):
        return [
            Request(
                "https://PHPBB_WEBISTE/ucp.php?mode=login";,
                callback=self.parse_welcome)
        ]

    # Post welcome page's first form with the given user/pass
    def parse_welcome(self, response):
        return FormRequest.from_response(
            response,
            formdata={"user": "CORRECTONE", "pass": "CORRECTONE"}
        )

def parse_item(self, response):

    print response.xpath('.').extract()

    return

--
You received this message because you are subscribed to the Google Groups 
"scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to