I am trying out Crawly with this tutorial https://hexdocs.pm/crawly/tutorial.html
I add the needed dependencies
defp deps do
[
{:crawly, "~> 0.13.0"},
{:floki, "~> 0.26.0"}
]
end
I run mix deps.get
and add the spider:
defmodule Homebase do
use Crawly.Spider
@impl Crawly.Spider
def base_url(), do: "https://www.homebase.co.uk"
@impl Crawly.Spider
def init() do
[
start_urls: [
"https://www.homebase.co.uk/our-range/tools"
]
]
end
@impl Crawly.Spider
def parse_item(_response) do
%Crawly.ParsedItem{:items => [], :requests => []}
end
end
I run iex -S mix
and get the following error:
** (Mix) Could not compile dependency:epipe, "/home/niki/.mix/rebar3 bare compile --paths /home/niki/projects/first-crawler/crawler2/spiderman/_build/dev/lib/*/ebin" command failed. You can recompile this dependency with "mix deps.compile epipe", update it with "mix deps.update epipe" or clean it with "mix deps.clean epipe"
I have tried the recommended solutuions by the output but nothing works.
edit: this is the output of mix deps.compile
:
EDIT: I installed kiex
and switched to version 1.10. That fixed tha peoblem
I installed kiex and switched to version 1.10. That fixed tha peoblem
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.