summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/itchio.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/itchio.py')
-rw-r--r--gallery_dl/extractor/itchio.py25
1 files changed, 2 insertions, 23 deletions
diff --git a/gallery_dl/extractor/itchio.py b/gallery_dl/extractor/itchio.py
index 6034d12..799dd66 100644
--- a/gallery_dl/extractor/itchio.py
+++ b/gallery_dl/extractor/itchio.py
@@ -21,28 +21,7 @@ class ItchioGameExtractor(Extractor):
filename_fmt = "{game[title]} ({id}).{extension}"
archive_fmt = "{id}"
pattern = r"(?:https?://)?(\w+).itch\.io/([\w-]+)"
- test = (
- ("https://sirtartarus.itch.io/a-craft-of-mine", {
- "pattern": r"https://\w+\.ssl\.hwcdn\.net/upload2"
- r"/game/1983311/7723751\?",
- "count": 1,
- "keyword": {
- "extension": "",
- "filename": "7723751",
- "game": {
- "id": 1983311,
- "noun": "game",
- "title": "A Craft Of Mine",
- "url": "https://sirtartarus.itch.io/a-craft-of-mine",
- },
- "user": {
- "id": 4060052,
- "name": "SirTartarus",
- "url": "https://sirtartarus.itch.io",
- },
- },
- }),
- )
+ example = "https://USER.itch.io/GAME"
def __init__(self, match):
self.user, self.slug = match.groups()
@@ -63,7 +42,7 @@ class ItchioGameExtractor(Extractor):
"Origin": "https://{}.itch.io".format(self.user),
}
data = {
- "csrf_token": text.unquote(self.session.cookies["itchio_token"]),
+ "csrf_token": text.unquote(self.cookies["itchio_token"]),
}
for upload_id in text.extract_iter(page, 'data-upload_id="', '"'):