AlanOC91 / YGOPRODeck

Yu-Gi-Oh! Card Database and Deck Share Site
81 stars 4 forks source link

A lot of cards having duplicate card_sets with faulty rarity #480

Closed keinervonuns closed 9 months ago

keinervonuns commented 9 months ago

I noticed today that some cards return duplicate card_sets entries with the same rarity but with the reprint/new status or a quantity attached. Seems like it is pulling it from the Yugipedia pages. I noticed it on multiple cards of the sets GLAS, MP21, AMDE, ROTD and YSYR in slightly different variations ("C|print=Reprint", "Secret Rare; Reprint", "R|print=New", "C|qty=1", "C; 2", "Common|qty=1|print=Speed Duel debut", ...)

Example 1: Squeaknight

"card_sets":[ { "set_name":"2021 Tin of Ancient Battles", "set_code":"MP21-EN013", "set_rarity":"C|print=Reprint", "set_rarity_code":"", "set_price":"0" },{ "set_name":"2021 Tin of Ancient Battles", "set_code":"MP21-EN013", "set_rarity":"Common", "set_rarity_code":"(C)", "set_price":"0.95" }, ...]

Example 2: Mystical Elf

"card_sets": [{ "set_name":"Legendary Collection 3: Yugi's World Mega Pack", "set_code":"LCYW-EN005", "set_rarity":"C|print=Reprint", "set_rarity_code":"", "set_price":"0" }, { "set_name":"Starter Deck: Yugi Evolution", "set_code":"SYE-002", "set_rarity":"Common|print=Reprint", "set_rarity_code":"", "set_price":"0" },{ "set_name":"Starter Deck: Yugi Reloaded", "set_code":"YSYR-EN002", "set_rarity":"C|qty=1", "set_rarity_code":"", "set_price":"0" }...]

This occurs on 7556 card_sets belonging to 5283 cards returned from the https://db.ygoprodeck.com/api/v7/cardinfo.php endpoint.

AlanOC91 commented 9 months ago

Thanks for this! I cleaned up a huge amount of invalid set entries.

On Friday I also completely re-wrote our script that generates these to hopefully be a bit more robust going forward.