Comments (13)
Hey @Ziinc apparently your code works for me. Maybe you have some other details to share? Maybe I should try with different Elixir/Erlang versions?
from crawly.
Could you also try to do Crawly.fetch("https://www.erlang-solutions.com/blog.html")
just to check if it's possible to make requests to the blog from your machine?
from crawly.
@Ziinc in any case tell me what you're trying to achieve so I could try to help.
from crawly.
I'm trying to integrate Crawly with an existing phoenix project.
My dependencies are as follows (though I doubt that there would be dependency conflicts:
defp deps do
[
{:phoenix, "~> 1.4.0"},
{:phoenix_pubsub, "~> 1.1"},
{:phoenix_ecto, "~> 4.0"},
{:ecto_sql, "~> 3.0"},
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 2.11"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:gettext, "~> 0.11"},
{:jason, "~> 1.0"},
{:plug_cowboy, "~> 2.0"},
{:mix_test_watch, "~> 0.8", only: :dev, runtime: false},
{:comeonin, "~> 4.1"},
{:bcrypt_elixir, "~> 1.1"},
{:distillery, "~> 2.0", runtime: false},
{:httpoison, "~> 1.4"},
{:ex_aws, "~> 2.0"},
{:ex_aws_s3, "~> 2.0"},
{:sweet_xml, "~> 0.6"},
{:bureaucrat, "~> 0.2.5"},
{:hound, "~> 1.0", only: [:dev, :test], runtime: false},
{:mogrify, "~> 0.7.3"},
{:honeydew, "~> 1.4.4"},
{:crawly, "~> 0.5.0"}
]
end
I was actually initially on 1.8.2 when I first encountered the issue, and I had updated to see if it would help.
This is what happens with the Crawly.fetch()
Interactive Elixir (1.9.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Crawly.fetch("https://www.erlang-solutions.com/blog.html")
{:error,
%HTTPoison.Error{id: nil, reason: {:option, :server_only, :honor_cipher_order}}}
I will try the quickstart on a fresh project and report back
from crawly.
@oltarasenko I've been able to get the quickstart to work in a new project, but it still does not work when i try add it into the existing project. I think it's an issue with dependency conflicts, notably httpoison.
from crawly.
@oltarasenko Seems like it is an issue with hackney:
https://elixirforum.com/t/hackney-error-option-server-only-honor-cipher-order/25541
I'll try recompiling and updating the deps and try again
from crawly.
Updating the httpoison dependency did the trick, it upgraded hackney to the latest version, where the ssl issue was fixed. Thanks!
from crawly.
I think instead of letting the httpoison errors get swallowed up, it would be good to let them surface as debug logs.
from crawly.
Ok, I am re-opening it, as the thing you have mentioned (https://github.com/oltarasenko/crawly/blob/master/lib/crawly/worker.ex#L43) requires a fix. Will process an error here & log the error message. Good catch!
from crawly.
@Ziinc Could you please have a glance at #15. It is pretty trivial for now. however, I plan to extend the worker quite soon (as I am currently working on a support of different user agents (aka webdriver support))
from crawly.
looks good. A possible extension (to add to backlog) for error behaviour could be a configurable fallback module to call when the backoff retries fail, thereby allowing the engine to exec some wrap up function, possibly to alert for errors.
from crawly.
A possible extension (to add to backlog) for error behaviour could be a configurable fallback module to call when the backoff retries fail, thereby allowing the engine to exec some wrap up function, possibly to alert for errors.
Possibly specified at either spider level or config level
from crawly.
This is now fixed in 0.6.0
from crawly.
Related Issues (20)
- Crawly.fetch giving 301 response instead of 200 HOT 1
- My Spider's code is never invoked, weird behavior with `Crawly.RequestsStorage.pop` in library code HOT 5
- This is actually a question, Nested scraping HOT 2
- Genserver time out crash in long-running pipeline HOT 1
- Stop and resume the spider where it stopped HOT 2
- Protocol error HOT 7
- `Crawly.Fetchers.Fetcher` implementation for Playwright HOT 4
- robots.txt matching is pretty buggy HOT 10
- Running many instances of one spider HOT 3
- Make the management tool opt-in by default HOT 5
- Q: Can the spider "fan out" on a website? (multiple next items) HOT 1
- Error: Could not load spiders. HOT 5
- [error] Pipeline crash by call: Crawly.Middlewares.UniqueRequest.run
- Encountering Complications with Forwarding to Crawly.API.Router HOT 1
- Upgrade to `httpoison` 2.x? HOT 3
- management Web UI on localhost:4001 is not working HOT 4
- Does Crawly support requests using the POST method? HOT 1
- Crawly compilation warnings, undefined Floki functions HOT 1
- CI issue: Failed to upload the report to 'https://coveralls.io', Couldn't find a repository matching this job. HOT 1
- Set base_url in init options instead of callback HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crawly.