Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the use of Proxies #120

Merged
merged 1 commit into from
Sep 28, 2023
Merged

Enable the use of Proxies #120

merged 1 commit into from
Sep 28, 2023

Conversation

otsch
Copy link
Member

@otsch otsch commented Sep 28, 2023

Add new methods HttpLoader::useProxy() and
HttpLoader::useRotatingProxies([...]) to define proxies that the loader shall use. They can be used with a guzzle HTTP client instance (default) and when the loader uses the headless chrome browser. Using them when providing some other PSR-18 implementation will throw an exception.
(see #99)

Also, fix the HttpLoader::load() implementation won't throw any exception, because it shouldn't kill a crawler run. When you want any loading error to end the whole crawler execution
HttpLoader::loadOrFail() should be used. Also adapted the phpdoc in the LoaderInterface.

Add new methods `HttpLoader::useProxy()` and
`HttpLoader::useRotatingProxies([...])` to define proxies that the
loader shall use. They can be used with a guzzle HTTP client instance
(default) and when the loader uses the headless chrome browser. Using
them when providing some other PSR-18 implementation will throw an
exception.
(see #99)

Also, fix the `HttpLoader::load()` implementation won't throw any
exception, because it shouldn't kill a crawler run. When you want any
loading error to end the whole crawler execution
`HttpLoader::loadOrFail()` should be used. Also adapted the phpdoc in
the `LoaderInterface`.
@otsch otsch mentioned this pull request Sep 28, 2023
@otsch otsch merged commit ed818cd into main Sep 28, 2023
6 checks passed
@otsch otsch deleted the feature/proxies branch October 23, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant