Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #3

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

steps:
- name: Check out
- uses: actions/checkout@v3
Expand Down
29 changes: 28 additions & 1 deletion lib/afl_fantasy_scraper/break_evens/break_evens.ex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,34 @@ defmodule AflFantasyScraper.BreakEvens.BreakEvens do
def parse_row(
{"tr", _,
[
{"td", _, [_, {_, _, [name]}, {_, _, [position]}]},
{"td", _, [_, _, {_, _, [name]}, {_, _, [position]}]},
{"td", _, [{_, _, [team]}]},
{"td", _, [price]},
{"td", _, [games]},
{"td", _, [average]},
{"td", _, [breakeven, _]},
{"td", _, [likelihood]}
]}
) do
[name, position, team, price, games, average, breakeven, likelihood]
|> Enum.map(&String.trim/1)

%{
:player => name,
:position => position,
:team => team,
:price => price,
:games => games,
:avg => average,
:breakeven => breakeven,
:likelihood => likelihood
}
end

def parse_row(
{"tr", _,
[
{"td", _, [_, _, {_, _, [name]}, {_, _, [position]}]},
{"td", _, [{_, _, [team]}]},
{"td", _, [price]},
{"td", _, [games]},
Expand Down
Loading