Itchio Downloader Tool with python

Overview

Itchio Downloader Tool

Install

pip install git+https://github.com/emersont1/itchio 

Download All Games in library from account

python -m itchio.downloader

This uses the same API the itchio app uses to download the files. If you have 2FA enabled, generate an API key here and run the following instead

python -m itchio.downloader --api-key=KEYHERE

Add All Games in a bundle to your library

python -m itchio.downloader

This is a bit of a bodge, but it works. It essentially goes through and clicks the "Download" link on every item on the bundle's page, which adds it to your itchio library. It does not download any files. You will need the download page's URL (this will be in the bundle's email, and possibly your purchase history). It will not work with 2FA, and I'm unlikely to be able to fix it without making it far more complicated

Comments
  • Downloader is creating folders and JSON files for about half of my library, then exiting

    Downloader is creating folders and JSON files for about half of my library, then exiting

    I have three bundles which I have added to my itch.io library, resulting in about 4,000 games in my library. When using python -m itchiodl.downloader with my API key to download my library, the following occurs:

    • The downloader says a number of "pages" are loaded
    • The downloader starts going through the list of games, saying it is downloading them
    • Publisher and game folders are created for these games on my hard drive in the CWD
    • JSON files are also created for games, within publisher folders
    • The downloader says games have been downloaded (x of 3918)
    • Nothing is actually downloaded except for the JSON files
    • Eventually the downloader simply stops, with the last item being that a game was downloaded (x of 3918)

    Sometimes it makes it to about 1,000 games "downloaded", sometimes 1,500 before it quits. It leaves no error message or error text file with any other information. It doesn't seem to matter if I change the number of jobs (I've tried 4 jobs and 8 jobs), run with administrator privileges (using Python through Windows command prompt), or anything else. I'm not utilizing a VPN or anything else special. I'm running Python 3.9 64-bit on Windows 10.

    opened by RBZL 18
  • Broken on Python 3.10

    Broken on Python 3.10

    Both scripts doesn't seem to work on Python 3.10:

    itch-download:

    Traceback (most recent call last):
      File "/home/user/.local/bin/itch-download", line 8, in <module>
        sys.exit(main())
      File "/home/user/.local/lib/python3.10/site-packages/itchiodl/downloader/__main__.py", line 21, in main
        l = itchiodl.LoginAPI(user, password)
      File "/home/user/.local/lib/python3.10/site-packages/itchiodl/login.py", line 29, in LoginAPI
        raise RuntimeError
    RuntimeError
    

    itch-load-bundle:

    Traceback (most recent call last):
      File "/home/user/.local/bin/itch-load-bundle", line 8, in <module>
        sys.exit(main())
      File "/home/user/.local/lib/python3.10/site-packages/itchiodl/bundle_tool/__main__.py", line 12, in main
        b.load_games()
      File "/home/user/.local/lib/python3.10/site-packages/itchiodl/bundle.py", line 14, in load_games
        pages = int(s.select("span.pager_label a")[-1].text)
    IndexError: list index out of range
    

    Works fine on Python 3.9

    opened by TheFrenchGhosty 16
  • Dropbox link crashes the downloader

    Dropbox link crashes the downloader

    Hey, great tool! I'm trying to download my library but it always crashes at a game that only has a dropbox link for download.

    Traceback (most recent call last): File "C:\Users*\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users*\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 85, in run_code exec(code, run_globals) File "C:\Users*\AppData\Local\Programs\Python\Python38\lib\site-packages\itchio\downloader_main.py", line 26, in lib.download_library() File "C:\Users*\AppData\Local\Programs\Python\Python38\lib\site-packages\itchio\library.py", line 32, in download_library game.download(self.login) File "C:\Users*\AppData\Local\Programs\Python\Python38\lib\site-packages\itchio\game.py", line 62, in download itchio.utils.download(url, path, self.name +" - "+file) File "C:\Users*\AppData\Local\Programs\Python\Python38\lib\site-packages\itchio\utils.py", line 11, in download filename = re.search(r'filename="(.+)"', cd).group(1) File "C:\Users*\AppData\Local\Programs\Python\Python38\lib\re.py", line 199, in search return _compile(pattern, flags).search(string) TypeError: expected string or bytes-like object

    Since there's no way to remove games from the library, could you please add a way to ignore games with dropbox links?

    The only workaround I've found is to create a .json file with the name of the game so that the downloader skips it.

    opened by bathrobehero 10
  • Crash - AttributeError: 'NoneType' object has no attribute 'group'

    Crash - AttributeError: 'NoneType' object has no attribute 'group'

    The download script consistently crash on this file.

    Downloading Calico - Calico.Template.zip
    Traceback (most recent call last):
      File "/home/user/.local/bin/itch-download", line 8, in <module>
        sys.exit(main())
      File "/home/user/.local/lib/python3.10/site-packages/itchiodl/downloader/__main__.py", line 31, in main
        lib.download_library()
      File "/home/user/.local/lib/python3.10/site-packages/itchiodl/library.py", line 35, in download_library
        game.download(self.login)
      File "/home/user/.local/lib/python3.10/site-packages/itchiodl/game.py", line 68, in download
        itchiodl.utils.download(url, path, self.name + " - " + file)
      File "/home/user/.local/lib/python3.10/site-packages/itchiodl/utils.py", line 21, in download
        filename = re.search(r'filename="(.+)"', cd).group(1)
    AttributeError: 'NoneType' object has no attribute 'group'
    
    opened by TheFrenchGhosty 7
  • TypeError: expected string or bytes-like object

    TypeError: expected string or bytes-like object

    Downloading Troika! Numinous Edition - edit
    Traceback (most recent call last):
      File "c:\Python310\lib\runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "c:\Python310\lib\runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "c:\Python310\lib\site-packages\itchio\downloader\__main__.py", line 26, in <module>
        lib.download_library()
      File "c:\Python310\lib\site-packages\itchio\library.py", line 32, in download_library
        game.download(self.login)
      File "c:\Python310\lib\site-packages\itchio\game.py", line 62, in download
        itchio.utils.download(url, path, self.name +" - "+file)
      File "c:\Python310\lib\site-packages\itchio\utils.py", line 11, in download
        filename = re.search(r'filename="(.+)"', cd).group(1)
      File "c:\Python310\lib\re.py", line 200, in search
        return _compile(pattern, flags).search(string)
    TypeError: expected string or bytes-like object
    

    The game in question is: https://melsonian-arts-council.itch.io/troika-numinous-edition/ purchased from the Ukraine bundle.

    The type of cd is none, thus the header doesn't exist, if I understand it correctly.

    opened by RonaldH 7
  • Download free games with this tool?

    Download free games with this tool?

    Maybe add the ability to input a link to a game page, like https://etra-etra-games.itch.io/vortex-an-fps-where-you-cant-damage-enemies for example, so that you can download games that aren’t able to be added to your library.

    opened by wertercatt 6
  • Differentiate between Windows, Linux and MacOS

    Differentiate between Windows, Linux and MacOS

    Is there any way to differentiate between Windows, Linux and MacOS versions? For example if I want to download all Windows versions of all games (since I don't use Linux or MacOS)?

    Currently as I see it really downloads everything, even if I don't need Linux or MacOS.

    opened by lostprophet 6
  • Need to clean output name

    Need to clean output name

    On windows, at least.

    Too lazy to submit a PR, but this works: Utils.py:

    def download_url(url, output_path, desc):
        with DownloadProgressBar(unit='B', unit_scale=True,
                                 miniters=1, desc=desc) as t:
            output_path = re.sub(r'[\:\*\?\"\<\>\|]', ' ', output_path)
            urllib.request.urlretrieve(url, filename=output_path, reporthook=t.update_to)
    
    opened by pdughi 6
  • Adding Multithreading

    Adding Multithreading

    hey all

    I know this is gaining some traction at the moment, so I thought I'd add some multithreading to try and make it run faster / more efficiently

    I'm not going to merge this in until I've had several people test this, so I'd appreciate feedback in the comments

    Installing:

    # clone the repo
    git clone https://github.com/Emersont1/itchio
    
    # checkout to multithreading
    cd itchio
    git checkout multithreading
    
    # create and load a venv
    python -m venv venv
    source venv/bin/activate
    
    # install
    pip install .
    
    # profit?
    python -m itchiodl.downloader -k INSERT_API_KEY_HERE
    
    opened by Emersont1 5
  • Running into error while trying to add all items in a bundle to my account

    Running into error while trying to add all items in a bundle to my account

    C:\Users\Username\Desktop\ItchioGames>python -m itchiodl.bundle_tool
    Username: removed
    Password:
    Bundle URL: removed
    Traceback (most recent call last):
      File "C:\Users\Username\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "C:\Users\Username\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "C:\Users\Username\AppData\Local\Programs\Python\Python310\lib\site-packages\itchiodl\bundle_tool\__main__.py", line 17, in <module>
        main()
      File "C:\Users\Username\AppData\Local\Programs\Python\Python310\lib\site-packages\itchiodl\bundle_tool\__main__.py", line 13, in main
        b.load_games()
      File "C:\Users\Username\AppData\Local\Programs\Python\Python310\lib\site-packages\itchiodl\bundle.py", line 15, in load_games
        pages = int(s.select("span.pager_label a")[-1].text)
    IndexError: list index out of range
    

    Extra info: I am not using 2FA, just username and password

    How can I fix this?

    opened by Technerder 4
  • Added some filename fixes

    Added some filename fixes

    Hopefully this will fix the issues in #28

    Can you test it on the one it wasn't working on before with these fixes please

    # clone the repo
    git clone https://github.com/Emersont1/itchio
    
    # checkout to filename-fixes
    cd itchio
    git checkout filename-fixes
    
    # create and load a venv
    python -m venv venv
    source venv/bin/activate
    
    # install
    pip install .
    
    # profit?
    python -m itchiodl.downloader -k INSERT_API_KEY_HERE
    
    opened by Emersont1 4
  • Detect (and remove) files that aren't available on Itch servers (older version of games)

    Detect (and remove) files that aren't available on Itch servers (older version of games)

    Currently, itchiodl will download every new file as if the older one don't exist:

    • if a file with the same name exist, it will overwrite it
    • if a file with a different name exist, it will just download the new file and "ignore" the existing file

    This is a bit of a problem, in the sense that everytime a game update, you will more than likely keep the older version.

    lgogdownloader (the main GOG.com downloader) "solves" that with --check-orphan function that will check and reports (only reports, it won't do anything to them) the files that exist that aren't available to download anymore (which is, almost all the time: older versions).

    itchiodl definitely needs something like that considering how many "thing" someone can have with the bundles.

    Something that can delete those older files would be even better, but a "detector" would be a good start.

    PS: thanks (again) for itchiodl!

    opened by TheFrenchGhosty 0
  • Can't Get Downloader working

    Can't Get Downloader working

    I can't seem to get the downloader working, I got the bundle tool to add all my games to my library. When I start a download I get this window, it looks like it is downloading but no files or folders are made anywhere on my computer. I have tried Python 3.8 as I saw it was stable in a Reddit post and I have tried 3.10 as well. I even tried a different computer in case it was an issue with Windows 11. I have also tried using the API key as well. Is there something I am not doing? 2022-07-09 09_53_15-Command Prompt

    opened by Zurriel599 6
  • Verbose Folders Argument (And Others)

    Verbose Folders Argument (And Others)

    I feel like I've got these changes in a relatively clean spot for review, to summarize:

    • added the -vf argument for Verbose Folders, created folder structure uses display names for game titles and publishers
    • added the -v argument for toggling verify step functionality
    • added the -sas argument for specifying that you wish to skip downloading files above a size threshold (for disk saving)
    • various small improvements like using one call to os.makedirs() vs multiple os.mkdir() calls
    • patched an issue where download keys weren't being inherited properly by game objects as they were being appended to the library list, preventing downloads
    opened by N64Core 4
  • Add Games in bundle to library does not work

    Add Games in bundle to library does not work

    [email protected]:/# itch-load-bundle
    Username: [email protected]
    Password:
    Bundle URL: http://itch.io/bundle/download/4T80AvOSA70gkpyUhMNhaaghCbEY7J0DAJjWaWZd
    Traceback (most recent call last):
      File "/usr/local/bin/itch-load-bundle", line 8, in <module>
        sys.exit(main())
      File "/usr/local/lib/python3.10/site-packages/itchiodl/bundle_tool/__main__.py", line 13, in main
        b.load_games()
      File "/usr/local/lib/python3.10/site-packages/itchiodl/bundle.py", line 17, in load_games
        pages = int(s.select("span.pager_label a")[-1].text)
    IndexError: list index out of range
    [email protected]:/#
    

    Did I use the Program as intended, or is this actually an issue?

    opened by GhostJumper 8
Releases(v2.1.2)
  • v2.1.2(Nov 27, 2022)

  • v2.1.1(Nov 27, 2022)

  • v2.1.0(May 18, 2022)

    This adds the option to download games not already in your library

    What's Changed

    • Individual game by @Emersont1 in https://github.com/Emersont1/itchio/pull/53

    Full Changelog: https://github.com/Emersont1/itchio/compare/v2.0...v2.1.0

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(May 9, 2022)

    Version 2!

    There's a bunch of new features and should make it far easier to use

    What's Changed

    • Added some filename fixes by @Emersont1 in https://github.com/Emersont1/itchio/pull/29
    • Adding Multithreading by @Emersont1 in https://github.com/Emersont1/itchio/pull/20
    • Platform tools by @Emersont1 in https://github.com/Emersont1/itchio/pull/40
    • Added cleaned up path (#6 fix) by @Emersont1 in https://github.com/Emersont1/itchio/pull/42
    • Fixes by autopep8 action by @github-actions in https://github.com/Emersont1/itchio/pull/45
    • Fixes using md5sums by @Emersont1 in https://github.com/Emersont1/itchio/pull/46
    • Added Beautified JSON output by @Emersont1 in https://github.com/Emersont1/itchio/pull/30
    • linting by @Emersont1 in https://github.com/Emersont1/itchio/pull/51
    • Added Progress Output by @Emersont1 in https://github.com/Emersont1/itchio/pull/52
    • Version 2.0 changes by @Emersont1 in https://github.com/Emersont1/itchio/pull/35

    Full Changelog: https://github.com/Emersont1/itchio/compare/v1.2.1...v2.0

    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Mar 12, 2022)

  • v1.1.1(Mar 9, 2022)

Owner
Peter Taylor
Development Secretary @HackSocNotts,
Peter Taylor
S3 file download with Python and access with VBA

S3 file download with Python and access with VBA This simple project is using the following stacks: Python AWS S3 VBA/Excel A Bitcoin API With this st

Julio Cesar Scheidt 0 Dec 07, 2021
YouTube Video Search Engine For Python

YouTube-Video-Search-Engine Introduction With the increasing demand for electronic devices, it is hard for people to choose the best products from mul

1 Dec 21, 2021
Script that allows to download portable installers of different versions Adobe software for macOS

What is this and for what This is a script that allows you to download portable installers of programs from Adobe for macOS with different versions. T

715 Jan 06, 2023
This is a Text Data Analysis Project Involving (YouTube Case Study).

Text_Data_Analysis This is a Text Data Analysis Project Involving (YouTube Case Study). Problem Statement = Sentiment Analysis. Package1: There are m

1 Mar 05, 2022
apkizer is a mass downloader for android applications for all available versions.

apkizer apkizer collects all available versions of an Android application from apkpure.com Purpose Sometimes mobile applications can be useful to dig

Kamil Onur Özkaleli 41 Dec 16, 2022
Neon: an add-on for making it easier to handle component interactions

Neon Neon is an add-on for Lightbulb making it easier to handle component interactions. Installation pip install git+https://github.com/neonjonn/light

Neon Jonn 9 Apr 29, 2022
A manga download script written in python.

manga-dlp python script to download mangas Description A manga download script written in python. It only supports mangadex.org for now. But support f

Ivan Schaller 15 Nov 28, 2022
YT-Downloader is a Tool to download youtube video.

YT-Downloader YT-Downloader is a Tool to download youtube video.If you are looking for a simple video downloader tool Than This YT-Downloader may be u

Pradip Thapa 7 May 11, 2022
Download images where login is required using har python and js

이미지 다운로드(har, python, js 사용) 로그인이 필요한 사이트에서 DevTools로 이미지를 다운받는 방법은 조금 까다로웠다. 가장 쉽게 할 수 있는 방법을 찾아보았다. 사용법 F12를 눌러 DevTools를 실행 Network 탭으로 이동 페이지 새로고침

0 Jul 22, 2022
Let's you download entire YT-playlists.

Youtube MP3 Playlist Downloader Let's you download entire youtube playlists as mp3 files. This application is basically a script that makes it easier

11 Dec 18, 2022
Download YouTube videos that are available in the given playlist

Youtube-Playlist-Downloader Download YouTube videos that are in a playlist Project assets: music downloaded music folder. (will be generated) music.db

Sultan Aljaberi 1 Dec 22, 2021
Fully automated download and parsing for Texas A&M University's Registrar's grade distribution PDFs for years 2014+.

Fully automated download and parsing for Texas A&M University's Registrar's grade distribution PDFs for years 2014+. Adds the parsing results to a mySQL database.

TAMU Grade Distribution 1 Sep 28, 2022
The sole purpose of this script is to download any NFT collection from OpenSea

OpenSea NFT Stealer The sole purpose of this script is to download any NFT collection from OpenSea. Setup Prerequisites: Python 3 Python requests libr

Phillip 9 Sep 04, 2022
Spotify Playlist Downloader With Python

Spotify Playlist Downloader This will let you download Spotify playlists for free without Premium. It gets all the songs from the API and downloads th

Yasho 16 Sep 28, 2022
Ripurei is a free-to-use osu! replay downloader, that can be configured to download from any osu! server.

Ripurei Ripurei is a fully functional osu! replay downloader, fully capable of downloading from almost any osu! server. Functionality Timeline ✔️ Able

Thomas 0 Feb 11, 2022
Tool to download Netflix in 4k

Netflix-4K-Script Tool to download Netflix in 4k You will need to get a L1 CDM that is whitelsited with Netflix CDM In this script are downgraded

9 Dec 23, 2021
Stremio addon for fetching videos from your google drive.

stremio-gdrive Instructions: There are two ways to go about: Method 1 is hard and long but might give you better performance and you need to make your

72 Dec 31, 2022
Tool To download Amazon 4k SDR HDR 1080, CDM IS Not Included

WV-AMZN-4K-RIPPER Tool To download Amazon 4k SDR HDR 1080, CDM IS Not Included For CDM You can Mail :- 11 Dec 23, 2021

Download clips from youtube videos with a few clicks and a GUI!

YouClip v2.0.0 Table Of Contents: What Is YouClip Installation Usage Stuff To Fix Changelog What Is YouClip? ! IMPORTANT: The source files are a total

ador 2 Oct 05, 2021