dongxi5505 2017-04-05 13:02
浏览 77

如何使用Guzzle,Goutte和Symfony 3处理多重重定向?

I want to crawl https://www.socialbakers.com/ but I am having trouble handling the multiple redirections when doing a post in logging in to the site. First redirect is to a HTML page with JavaScript doing the redirection.

I want to trace all the redirection request URL and if it is possible to do post/get request to each URL.

  • 写回答

1条回答 默认 最新

  • doupiao1893 2017-04-06 07:41
    关注

    Goutte is a simple web scraper, because it doesn't support JS.

    If you are stuck with JS, then you need something more powerful, like Selenium or PhantomJS.

    Take a look at PhantomJS, it's simple and fast.

    Selenium also has a driver for PhantomJS, if you prefer to stay with PHP (you can use Mink with Selenium and PhantomJS).

    评论

报告相同问题?