vantoozz / proxy-scraper Goto Github PK
View Code? Open in Web Editor NEWLibrary for scraping free proxies lists
License: MIT License
Library for scraping free proxies lists
License: MIT License
From the README file:
$scraper = new Scrapers\FreeProxyListScraper($httpClient);
foreach ($scraper->get() as $proxy) {
echo (string)$proxy . "\n";
}
This will output ip:port
.
I think currently there is no way to get the proxy protocol (HTTP, HTTPS, SOCKS) too.
If this is implemented, users can create filters like for example:
foreach ($scraper->get() as $proxy) {
// Only show proxies with the HTTPS protocol
if ($proxy->getProtocol() == "HTTPS") {
echo (string)$proxy . "\n";
}
}
If the protocol can't be scraped (this is mostly the case with online .txt lists) maybe you can just return ANY
or null
when using $proxy->getProtocol()
.
Hello,
I am using PHP 7.1.33
and Composer version 1.9.1 2019-11-01 17:20:17
.
When trying to install proxy-scraper
like the following I get an error:
C:\Users\Code\project>composer require php-http/guzzle6-adapter
Using version ^2.0 for php-http/guzzle6-adapter
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 9 installs, 0 updates, 0 removals
- Installing ralouphie/getallheaders (3.0.3): Loading from cache
- Installing psr/http-message (1.0.1): Loading from cache
- Installing guzzlehttp/psr7 (1.6.1): Loading from cache
- Installing guzzlehttp/promises (v1.3.1): Loading from cache
- Installing guzzlehttp/guzzle (6.5.2): Loading from cache
- Installing psr/http-client (1.0.0): Loading from cache
- Installing php-http/promise (v1.0.0): Loading from cache
- Installing php-http/httplug (2.1.0): Loading from cache
- Installing php-http/guzzle6-adapter (v2.0.1): Loading from cache
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
guzzlehttp/guzzle suggests installing psr/log (Required for using the Log middleware)
guzzlehttp/guzzle suggests installing ext-intl (Required for Internationalized Domain Name (IDN) support)
Writing lock file
Generating autoload files
C:\Users\Code\project>composer require vantoozz/proxy-scraper
Using version ^1.8 for vantoozz/proxy-scraper
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for vantoozz/proxy-scraper ^1.8 -> satisfiable by vantoozz/proxy-scraper[v1.8.0, v1.8.1].
- Can only install one of: php-http/httplug[v1.1.0, 2.1.0].
- Can only install one of: php-http/httplug[v1.1.0, 2.1.0].
- Can only install one of: php-http/httplug[v1.1.0, 2.1.0].
- Conclusion: install php-http/httplug v1.1.0
- Installation request for php-http/httplug (locked at 2.1.0) -> satisfiable by php-http/httplug[2.1.0].
Installation failed, reverting ./composer.json to its original content.
Any suggestions what I am doing wrong?
I appreciate your replies!
Awesome library!
Could you add support to add custom headers? It is quite a requirement to add custom user agent / referrer because many websites will block you from scraping too often.
composer require vantoozz/proxy-scraper:~2 php-http/guzzle6-adapter hanneskod/classtools
I have this output :
Using version ^1.2 for hanneskod/classtools
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Can only install one of: vantoozz/proxy-scraper[v2.0.0, dev-master].
- Can only install one of: vantoozz/proxy-scraper[v2.0.1, dev-master].
- Can only install one of: vantoozz/proxy-scraper[v2.1.0, dev-master].
- Installation request for vantoozz/proxy-scraper dev-master -> satisfiable by vantoozz/proxy-scraper[dev-master].
- Installation request for vantoozz/proxy-scraper ~2 -> satisfiable by vantoozz/proxy-scraper[v2.0.0, v2.0.1, v2.1.0].
What can I do to fix it ?
Hi, I've forked your repo and created a branch with php7.0 support.
If you want, I'll make a pull request
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.