2017 © Pedro Peláez
 

yii2-extension yii2-crawler

Advanced web crawler

image

macklus/yii2-crawler

Advanced web crawler

  • Friday, April 1, 2016
  • by macklus
  • Repository
  • 2 Watchers
  • 1 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 7 % Grown

The README.md

yii2-crawler

Advanced web crawler module, (*1)

Features

  • Multiple connections on single object
  • Define and use multiple proxys
  • Define and use multiple identities (usarname/password)

Install

Install using composer:, (*2)

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist macklus/yii2-geoselect "*"

or add, (*5)

"macklus/yii2-geoselect": "*"

to the require section of your composer.json file., (*6)

Usage

Create new object:, (*7)

<?php

namespace app\controllers;

use macklus\Crawler\Crawler;

class TestController extends Controller
{
    public function actionCraw()
    {
        $crawler = new Crawler();
    }
}

UserAgent

$crawler->setUA($browser)
/*
 * Browser could be chrome, firefox or explorer
 */

Identities

$crawler->setUser($name, $user, $password)
$crawler->setUsers(['user1' => ['username' => 'jhon', 'password' => 'doe']])

Proxys

$crawler->setProxy($name, $string)
$crawler->setProxys([['proxy1' => 'proxystring', 'proxy2' => 'proxy2string]])
/*
 * string should contain all proxy info, like http://username:password@proxy.thing.com:8080/
 */

The Versions

01/04 2016

dev-master

9999999-dev

Advanced web crawler

  Sources   Download

GPL-3.0+

The Requires

 

by Avatar macklus

extension yii2 crawler goutte proxy