Skip to content

Instantly share code, notes, and snippets.

@pratos
Created September 27, 2020 11:05
Show Gist options
  • Save pratos/b909849ecc2e267d25159ad8ace1646e to your computer and use it in GitHub Desktop.
Save pratos/b909849ecc2e267d25159ad8ace1646e to your computer and use it in GitHub Desktop.
Meeseeks <link> tag problem
import Meeseeks.XPath
HTTPoison.start()
{:ok, response} = HTTPoison.get("feeds.megaphone.fm/tamc1029044713")
doc = Meeseeks.parse(response.body)
[first, second | rest] = Meeseeks.all(doc, xpath("item"))
IO.puts Meeseeks.tree(first)
IO.puts Meeseeks.all(doc, xpath("item//link"))
IO.puts Meeseeks.all(doc, xpath("item//link/text()")) |> Enum.map(&Meeseeks.text/1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment