Packages

XML Parser for a Company's SEC Filings Feed An example of such a feed can be found here: https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=0001418091&CIK=0001418091&type=&dateb=&owner=exclude&start=0&count=40&output=atom

Current section

2 Versions

Jump to

Compare versions

4 files changed
+14 additions
-10 deletions
  @@ -1,6 +1,6 @@
1 1 # SecCompanyFilingsRssFeedParser
2 2
3 - [![Circle CI](https://circleci.com/gh/vikram7/sec_company_filings_rss_feed_parser.svg?style=svg)](https://circleci.com/gh/vikram7/sec_company_filings_rss_feed_parser)
3 + [![Circle CI](https://circleci.com/gh/vikram7/sec_company_filings_rss_feed_parser.svg?style=svg)](https://circleci.com/gh/vikram7/sec_company_filings_rss_feed_parser) [![HEX version](https://img.shields.io/hexpm/v/sec_company_filings_rss_feed_parser.png)](https://hex.pm/packages/sec_company_filings_rss_feed_parser)
4 4
5 5 ## Installation
  @@ -18,4 +18,4 @@
18 18 [{<<"app">>,<<"floki">>},
19 19 {<<"optional">>,false},
20 20 {<<"requirement">>,<<"~> 0.7.1">>}]}]}.
21 - {<<"version">>,<<"0.0.1">>}.
21 + {<<"version">>,<<"0.0.2">>}.
  @@ -29,16 +29,20 @@ defmodule SecCompanyFilingsRssFeedParser.Feed do
29 29 end
30 30
31 31 defp parse_updated(feed) do
32 - {_, _, date} = feed
33 - |> Floki.find("updated")
34 - |> tl
35 - |> tl
36 - |> hd
37 - date |> hd
32 + {_, _, [date]} =
33 + feed
34 + |> Floki.find("updated")
35 + |> List.last
36 +
37 + date
38 38 end
39 39
40 40 defp parse_title(feed) do
41 - {_, _, [title]} = feed |> Floki.find("title") |> tl |> tl |> hd
41 + {_, _, [title]} =
42 + feed |>
43 + Floki.find("title")
44 + |> List.last
45 +
42 46 title
43 47 end
  @@ -3,7 +3,7 @@ defmodule SecCompanyFilingsRssFeedParser.Mixfile do
3 3
4 4 def project do
5 5 [app: :sec_company_filings_rss_feed_parser,
6 - version: "0.0.1",
6 + version: "0.0.2",
7 7 elixir: "~> 1.2",
8 8 description: description,
9 9 build_embedded: Mix.env == :prod,