In your first terminal type:
fastapi dev database.py # for development mode
# or
fastapi database.py # or whatever it is for non dev modeType Into Your Browser Window: https://127.0.0.1:8000/docs
If it stalls make sure your database is running in the terminal.
In a seperate terminal that is currently running your database.
python scraper.pyThis should base its starting position off of whatever the latest decklist_id is in your database
- Query
- Receive Response
- Convert to Correct Shape
The following is the correct Shape
| decklist_id | cardname_n | cardname_n+1 |
|---|---|---|
| decklist i | #n in i | #n+1 in i |
| decklist i+1 | #n in i+1 | #n+1 in i+1 |
I haven't really checked but not all of these decks are valid so I propose 2 methodologies
-
If its close to being legal (in terms of card count)
- If its above remove basic lands or cards at random
- If its below add a basic land until you reach 100
-
Label all the ones that aren't close as bad links in the above list you'll make
- This'll include decks that have no commander of which we just list with '' for the commander name