laravel - Crawling using Guzzle software, how to log in?
学习ing
学习ing 2017-06-13 09:24:34
0
1
798

The author uses Guzzle in the laravel framework to crawl the data on my homepage, purely out of interest; but the page obtained is the login page;

The author tried this way of writing, but it didn’t work

$response = $this->client->request('GET', '/u/greenlightt/articles', array(
    'auth' => [用户名,密码]
));

I hope someone can tell me?

学习ing
学习ing

reply all(1)
左手右手慢动作

First, you need to simulate login, then save cookies, and then use the cookies you got to crawl other pages. Let’s talk about your problem. . Boss Sunny will laugh like a barbell = =

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template