Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fix MTGTop8Downloader rejecting valid links pointing to the "www" subdomain. www.mtgtop8.com is valid, too. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | v0.28.x |
| Files: | files | file ages | folders |
| SHA3-256: |
42c2c3d1b940f60d192af2364c99ca3d |
| User & Date: | thomas 2024-06-24 17:55:16.129 |
Context
|
2024-06-25
| ||
| 08:05 | Pick bugfix from the v0.28.x branch, fixing the MTGTop8 URL re to accept the optional www. subdomain. check-in: 0835442b0a user: thomas tags: trunk | |
|
2024-06-24
| ||
| 18:01 | Add changelog entry. check-in: f06eec9479 user: thomas tags: v0.28.x | |
| 17:55 | Fix MTGTop8Downloader rejecting valid links pointing to the "www" subdomain. www.mtgtop8.com is valid, too. check-in: 42c2c3d1b9 user: thomas tags: v0.28.x | |
|
2024-05-07
| ||
| 17:23 | Release version 0.28.2 check-in: 651a2ce3c0 user: thomas tags: release, v0.28.x, v0.28.2 | |
Changes
Changes to mtg_proxy_printer/decklist_downloader.py.
| ︙ | ︙ | |||
165 166 167 168 169 170 171 |
class MTGTop8Downloader(DecklistDownloader):
"""
Downloader for https://mtgtop8.com. They host deck lists of tournaments
"""
DECKLIST_PATH_RE = re.compile(
| | | 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
class MTGTop8Downloader(DecklistDownloader):
"""
Downloader for https://mtgtop8.com. They host deck lists of tournaments
"""
DECKLIST_PATH_RE = re.compile(
r"https?://(www\.)?mtgtop8\.com/event\?e=\d+&d=(?P<deck_id>\d+).*?"
)
PARSER_CLASS = MagicWorkstationDeckDataFormatParser
APPLICABLE_WEBSITES = "MTGTop8 (mtgtop8.com)"
def map_to_download_url(self, decklist_url: str) -> str:
match = self.DECKLIST_PATH_RE.match(decklist_url)
deck_id = match["deck_id"]
|
| ︙ | ︙ |
Changes to tests/test_decklist_downloader.py.
| ︙ | ︙ | |||
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# MTG Arena Zone (mtgazone.com)
yield MTGAZoneDownloader, "https://mtgazone.com/deck/orzhov-phyrexians-march-of-the-machine-theorycraft/"
yield MTGAZoneDownloader, "https://mtgazone.com/deck/orzhov-phyrexians-march-of-the-machine-theorycraft"
# MTGTop8
yield MTGTop8Downloader, "http://mtgtop8.com/event?e=9011&d=251345&f=BL"
yield MTGTop8Downloader, "http://mtgtop8.com/event?e=9011&d=251345"
# mtgdecks.net
yield MtgDecksNetDownloader, "https://mtgdecks.net/Premodern/false-cure-decklist-by-pol-tavarone-1544582"
yield MtgDecksNetDownloader, "https://mtgdecks.net/Premodern/false-cure-decklist-by-pol-tavarone-1544582/"
# Moxfield
yield MoxfieldDownloader, "https://www.moxfield.com/decks/70auYSm75E-Iwf4Oc0g7Lg"
| > > | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# MTG Arena Zone (mtgazone.com)
yield MTGAZoneDownloader, "https://mtgazone.com/deck/orzhov-phyrexians-march-of-the-machine-theorycraft/"
yield MTGAZoneDownloader, "https://mtgazone.com/deck/orzhov-phyrexians-march-of-the-machine-theorycraft"
# MTGTop8
yield MTGTop8Downloader, "http://mtgtop8.com/event?e=9011&d=251345&f=BL"
yield MTGTop8Downloader, "http://mtgtop8.com/event?e=9011&d=251345"
yield MTGTop8Downloader, "http://www.mtgtop8.com/event?e=9011&d=251345&f=BL"
yield MTGTop8Downloader, "http://www.mtgtop8.com/event?e=9011&d=251345"
# mtgdecks.net
yield MtgDecksNetDownloader, "https://mtgdecks.net/Premodern/false-cure-decklist-by-pol-tavarone-1544582"
yield MtgDecksNetDownloader, "https://mtgdecks.net/Premodern/false-cure-decklist-by-pol-tavarone-1544582/"
# Moxfield
yield MoxfieldDownloader, "https://www.moxfield.com/decks/70auYSm75E-Iwf4Oc0g7Lg"
|
| ︙ | ︙ |