Revert "Add function to request csv from CubeCobra"
This reverts commit 17beb084cd.
This commit is contained in:
parent
17beb084cd
commit
a292ffb34e
1 changed files with 0 additions and 8 deletions
|
|
@ -1,17 +1,9 @@
|
||||||
import csv
|
import csv
|
||||||
import json
|
import json
|
||||||
import requests
|
|
||||||
|
|
||||||
from word_count import EXPECTED_HEADER, COLUMNS, TEMP_JSON, is_actual_mtg_card
|
from word_count import EXPECTED_HEADER, COLUMNS, TEMP_JSON, is_actual_mtg_card
|
||||||
|
|
||||||
|
|
||||||
def request_cube_csv(cube_name, cube_id):
|
|
||||||
url = f'https://cubecobra.com/cube/download/csv/{cube_id}'
|
|
||||||
url += '?primary=Color%20Category&secondary=Types-Multicolor&tertiary=CMC2'
|
|
||||||
response = requests.get(url)
|
|
||||||
open(f'cubecsvs/{cube_name}.csv', 'wb').write(response.content)
|
|
||||||
|
|
||||||
|
|
||||||
def load_cube_from_csv(filename, tag_filter=None):
|
def load_cube_from_csv(filename, tag_filter=None):
|
||||||
cards = []
|
cards = []
|
||||||
with open(filename) as f:
|
with open(filename) as f:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue