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
Tool To Get Downloads up to 4k from Paramount+

Paramount 4K Downloader Tool To Get Downloads up to 4k from Paramount+ 😄 Hello Fellow Developers/ ! Hi! My name is WVDUMP. I am Leaking the script

2 Dec 25, 2021
Python library to download bulk of images from Bing.com

Python library to download bulk of images form Bing.com. This package uses async url, which makes it very fast while downloading.

Guru Prasad Singh 105 Dec 14, 2022
The lyrics module of the repository apple-playlist-downloader

This is the lyrics module of the repository apple-playlist-downloader. With this code you can download the .lrc file (time synced lyrics) from yours t

Antoine Bollengier 6 Oct 07, 2022
Simple python script to download .mp3 formatted files from YouTube video URLs

Introduction: Simple python script to download .mp3 formatted files from YouTube video URLs Requirements: Requires: youtube_dl module Requires: ffmpeg

Pat 2 Aug 18, 2022
AkShare is an elegant and simple financial data interface library for Python, built for human beings! 开源财经数据接口库

Overview AkShare requires Python(64 bit) 3.7 or greater, aims to make fetch financial data as convenient as possible. Write less, get more! Documentat

Albert King 5.8k Jan 03, 2023
This Program helps you download songs from the Spotify track's link you give in.

Spotify-Downloader-GUI This Program helps you download songs from the Spotify track's link you give in. It uses yt-dlp to download songs from Youtube.

Harish 12 Jun 14, 2022
Python Youtube Video-Playlist Downloader

Youtube-Video-Playlist-Downloader-PyQt5 You can download videos and playlists on YouTube with this script. Script has GUI. Enjoy. Setup git clone http

Yunus Emre Öztürk 2 Jun 06, 2022
A simple python script to fetch Bing daily images and set them randomly using hsetroot

Daily bing walls A script to set the daily bing image as the wallpaper. It can also set from a random set of previously fetched wallpapers. usage: dai

Harinarayanan K S 5 Nov 23, 2022
A simple contents download module using url for python

A simple contents download module using url for python

Fayas Noushad 16 Oct 20, 2022
Youtube Downloader is a simple but highly efficient Youtube Video Downloader, made completly using Python

Youtube Downloader is a simple but highly efficient Youtube Video Downloader, made completly using Python

Arsh 2 Nov 26, 2022
A modern CLI to download animes automatically from Twist

Kurby Kurby is a nice and simple CLI that use Twist website, and their huge collection to download animes for free and automatically Animes from Twist

Alain BERRIER 48 Dec 22, 2022
YouTube Downloader Bot With Python

TG YᴏᴜTᴜʙᴇ Uᴘʟᴏᴀᴅᴇʀ * Commands YouTube for Audio & Video and sends it to telegram after receiving valid URL [Do not forwarded any just copy and paste

Pʀᴇᴅᴀᴛᴏʀ 5 Oct 21, 2022
lo2: Simple youtube-dl web frontend

Simple youtube-dl web frontend

Denis Volk 22 Jun 03, 2022
A simple Python program which uses youtube-dl for downloading YouTube videos as mp3 files.

yt-mp3 converter This is a simple Python program which uses youtube-dl for downloading YouTube videos as mp3 files. This program is for you if you are

nostalgicnerdpenguin 1 Oct 24, 2021
A股tick下载,自动判断交易日历,获取全市场level1数据

TickDown A股tick下载,自动判断交易日历,获取全市场level1数据 依赖项 func_timeout requests some_tool(仓库里) akshare 使用 定时任务在上午 09:07开始运行 参数调节 max_num 单批次提交的股票数,当前为800,可以自行尝试多个数

Demon Finch 7 Jul 06, 2022
Desktop utility to download images/videos/music/text from various websites, and more

Desktop utility to download images/videos/music/text from various websites, and more

Kurt Bestor 11.2k Jan 08, 2023
YouTube-Video-Downloader - Download Youtube Videos for free.

YouTube-Video-Downloader Download Youtube Videos for free. Installing Dependencies:- Windows pip install pytube Mac/Linux pip3 install pytube Clonin

Xception Inc. 1 Jan 01, 2022
ImageScraper is a cross-platform tool for downloading a specified count from xkcd, Astronomy Picture of the Day and Existential Comics

ImageScraper The ImageScraper is a cross-platform tool for downloading a specified count from xkcd, Astronomy Picture of the Day and Existential Comic

1amnobody 1 Jan 25, 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
A youtube-dl fork with additional features and fixes

yt-dlp is a youtube-dl fork based on the now inactive youtube-dlc. The main focus of this project is adding new features and patches while also keepin

yt-dlp 37.1k Jan 03, 2023