Created
September 27, 2020 11:05
-
-
Save pratos/b909849ecc2e267d25159ad8ace1646e to your computer and use it in GitHub Desktop.
Meeseeks <link> tag problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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