claytongentry / furlex

A structured data extraction tool written in Elixir
https://hex.pm/packages/furlex
Other
45 stars 18 forks source link

** (FunctionClauseError) no function clause matching in Keyword.get/3 #20

Closed hukendo closed 5 years ago

hukendo commented 5 years ago
iex(1)> Furlex.unfurl("https://www.youtube.com/watch?v=Gh6H7Md_L2k")

12:21:41.019 [error] Task #PID<0.683.0> started from #PID<0.680.0> terminating
** (FunctionClauseError) no function clause matching in Keyword.get/3
    (elixir) lib/keyword.ex:191: Keyword.get(nil, :oembed_host, nil)
    (furlex) lib/furlex/oembed.ex:112: Furlex.Oembed.process_url/1
    (furlex) lib/furlex/oembed.ex:7: Furlex.Oembed.request/5
    (furlex) lib/furlex/oembed.ex:20: Furlex.Oembed.fetch_providers/1
    (furlex) lib/furlex/oembed.ex:67: Furlex.Oembed.provider_from_url/2
    (furlex) lib/furlex/oembed.ex:53: Furlex.Oembed.endpoint_from_url/3
    (furlex) lib/furlex/fetcher.ex:26: Furlex.Fetcher.fetch_oembed/2
    (elixir) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
Function: &Furlex.Fetcher.fetch_oembed/2
    Args: ["https://www.youtube.com/watch?v=Gh6H7Md_L2k", []]
** (EXIT from #PID<0.680.0>) shell process exited with reason: an exception was raised:
    ** (FunctionClauseError) no function clause matching in Keyword.get/3
        (elixir) lib/keyword.ex:191: Keyword.get(nil, :oembed_host, nil)
        (furlex) lib/furlex/oembed.ex:112: Furlex.Oembed.process_url/1
        (furlex) lib/furlex/oembed.ex:7: Furlex.Oembed.request/5
        (furlex) lib/furlex/oembed.ex:20: Furlex.Oembed.fetch_providers/1
        (furlex) lib/furlex/oembed.ex:67: Furlex.Oembed.provider_from_url/2
        (furlex) lib/furlex/oembed.ex:53: Furlex.Oembed.endpoint_from_url/3
        (furlex) lib/furlex/fetcher.ex:26: Furlex.Fetcher.fetch_oembed/2
        (elixir) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
abitdodgy commented 5 years ago

You need to configure the oembed host in config.exs. This should be clarified in the read me.

config :furlex, Furlex.Oembed,
  oembed_host: "https://oembed.com"
claytongentry commented 5 years ago

Thanks!

claytongentry commented 5 years ago

@hukendo please give v.0.4.2 a shot