diff --git a/sevenkeys/Makefile b/sevenkeys/Makefile index 800c5f3..5fb6744 100644 --- a/sevenkeys/Makefile +++ b/sevenkeys/Makefile @@ -5,3 +5,6 @@ createdb: mysql --user=root --password=$(shell pass show sevenkeys/mysql) thead>tr>th").Text(), + } + }) +} + +func DeckSearch(params DeckSearchParameters) (DeckSearchResults, error) { + searchUrl := `https://www.mtggoldfish.com/deck_searches/create?utf8=✓&deck_search[name]=Burn&deck_search[format]=pauper&deck_search[types][]=&deck_search[types][]=tournament&deck_search[types][]=user&deck_search[player]=Jirach1&deck_search[date_range]=04%2F14%2F2024+-+04%2F28%2F2024&deck_search[deck_search_card_filters_attributes][0][card]=Kuldotha+Rebirth&deck_search[deck_search_card_filters_attributes][0][quantity]=4&deck_search[deck_search_card_filters_attributes][0][type]=maindeck&deck_search[deck_search_card_filters_attributes][1][card]=&deck_search[deck_search_card_filters_attributes][1][quantity]=1&deck_search[deck_search_card_filters_attributes][1][type]=maindeck&deck_search[deck_search_card_filters_attributes][2][card]=&deck_search[deck_search_card_filters_attributes][2][quantity]=1&deck_search[deck_search_card_filters_attributes][2][type]=maindeck&counter=3&commit=Search` + fmt.Println(searchUrl) + + geziyor.NewGeziyor(&geziyor.Options{ + StartURLs: []string{searchUrl}, + ParseFunc: parseSearchResults, + Exporters: []export.Exporter{&export.JSON{}}, + }).Start() + + return DeckSearchResults{}, nil +}