Automatically scrape all of your artifacts in Genshin Impact.

Overview

Genshin Artifact Scraper

Automatically scrape all of your artifacts in Genshin Impact. Features:

  • Simple recalibration (2 steps).
  • GUI to select OCR regions.
  • Regions reinitialization (7 steps).
  • Macro to iterate through artifacts.
  • File handling (using pickle).
  • Manual mode (no macro).

While I've made the program to be very user-friendly and versatile, ultimately the scope is too big for something that's originally started as a personal project.

Please play around with the parameters and calibration to get the best result. I've made sure to properly comment and tidy up the programs as best as I could so that you can easily modify it.

Originally forked from Genshin Artifact Rater by shrubin. My program uses their parsing and rating subroutines.

Some features I feel as necessary in the future:

  • .json export.
  • Full process example video.
  • Visual guide during region selection.

Setup

python -m pip install -r requirements.txt
conda install -c conda-forge tesserocr

Usage

As Genshin Impact runs on Admin, you need to run this with admin privileges. Otherwise, input events (mouse click) won't be recognized. But, you can try the manual mode (no admin required) by replacing main.py in this guide to manual.py (any item containing * symbol doesn't exist on manual mode).

Make sure to run this while in the inventory menu, not in the character selection menu.

Try to run once to calibrate:

python main.py -o

Recalibrate the coordinates by selecting regions in these order:

  1. Colored box area of the artifact.
  2. First 2x2 artifact tiles*.

About the selection GUI:

  • You can preview your selection right away.
  • Keep selecting region to continue zooming in.
  • Right click to zoom out a bit, then reselect again.
  • Close the window to finalize your selection.

Once you're done, you'll be given this output if successful:

+20 Plume
 - ATK 311
 - ATK% 5.8
 - CRIT DMG% 14.8
 - DEF 39
 - Energy Recharge% 16.2
Gladiator's Finale
Total: 8.14 (65.15%)
  Main: 4.00 (100.00%)
  Sub: 4.14 (48.75%)

If recalibration isn't successful, initialize the regions by selecting in these order (these instruction can be seen on the window title):

  1. Artifact type.
  2. Mainstat type.
  3. Mainstat value.
  4. Artifact level.
  5. All substats & set name.
  6. Artifact colored area.
  7. First 2x2 artifact tiles*.

Then start scraping:

python main.py

Parameters

You may play around with these simple parameters in the main.py file.

# Configs
LANG = tr.en()  # Language setting, placeholder
DIR = "./data/" # Output directory

MENU = [7,5,2]  # Menu dimension, x,y,page
SCROLL = 10*MENU[1]-1  # Scroll multiplier for page switch

To run debugging mode, use -d argument:

python main.py -d       # Full run + debug
python main.py -o -d    # Single run + debug

Also, you may change the stat weight in the rate.py file.

weights = {lang.hp: 0, lang.atk: 0.5, f'{lang.atk}%': 1, f'{lang.er}%': 0.5, lang.em: 0.5,
               f'{lang.phys}%': 1, f'{lang.cr}%': 1, f'{lang.cd}%': 1, f'{lang.elem}%': 1,
               f'{lang.hp}%': 0, f'{lang.df}%': 0, lang.df: 0, f'{lang.heal}%': 0}
You might also like...
Scrape Twitter for Tweets
Scrape Twitter for Tweets

Backers Thank you to all our backers! 🙏 [Become a backer] Sponsors Support this project by becoming a sponsor. Your logo will show up here with a lin

A basic API to scrape Craigslist.
A basic API to scrape Craigslist.

CLAPI A basic API to scrape Craigslist. Most useful for viewing posts across a broad geographic area or for viewing posts within a specific timeframe.

A Tool to scrape URLs for a given domain from wayback machine, Commoncrawl and OTX Alienvault
A Tool to scrape URLs for a given domain from wayback machine, Commoncrawl and OTX Alienvault

Mr_URL Mr.URL fetches known URLs for a given domain from Wayback Machine, Commoncrawl and OTX Alienvault. It also finds old versions of any given URL

Instagram bot that upload images for you which scrape posts from 9gag meme website or other Instagram users , which is 24/7 Automated Runnable.
Instagram bot that upload images for you which scrape posts from 9gag meme website or other Instagram users , which is 24/7 Automated Runnable.

Autonicgram Automates your Instagram posts by taking images from sites like 9gag or other Instagram accounts and posting it onto your page. Features A

Python SCript to scrape members from a selected Telegram group.

A python script to scrape all the members in a telegram group anad save in a CSV file. REGESTRING Go to this link https://core.telegram.org/api/obtain

Telegram bot to scrape images from the reddit universe
Telegram bot to scrape images from the reddit universe

Telegram bot to scrape images from the reddit universe

This is a story bot, that will scrape stories from r/stories subreddit and convert it into an Audio File.

Introduction This is a story bot, that will scrape stories from r/stories subreddit and convert it into an Audio File. Installation pip install -r req

Python script to scrape users/id/badges/creation-date from a Discord Server Memberlist
Python script to scrape users/id/badges/creation-date from a Discord Server Memberlist

Discord Server Badges Scraper - Credits to bytixo he made this Custom Discord Vanity Creator How To Use Install discum 1.2 Open a terminal and execute

A quick-and-dirty script to scrape the daily menu of Leipzig University Mensa and send it to a telegram channel.
A quick-and-dirty script to scrape the daily menu of Leipzig University Mensa and send it to a telegram channel.

Feed me Mensa UL A quick-and-dirty script to scrape the daily menu of Leipzig University Mensa and send it to a telegram channel. For food and cat lov

Comments
  • When the image is cropped, it returns empty array

    When the image is cropped, it returns empty array

    When trying to use your tool, the screenshot is taken properly, but in line 146 of main.py, when the image is cropped

    crop = img[coords[i][2]:coords[i][3], coords[i][0]:coords[i][1], :]

    the variable becomes an empty string

    Resulting then in error:

    cv2.error: OpenCV(4.5.4) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\smooth.dispatch.cpp:617: error: (-215:Assertion failed) !_src.empty() in function 'cv::GaussianBlur'

    opened by bewuwy 0
Owner
null
Automate HoYoLAB Genshin Daily Check-In Using Github Actions

Genshin Daily Check-In ?? Automate HoYoLAB Daily Check-In Using Github Actions KOR, ENG Instructions Fork the repository Go to Settings -> Secrets Cli

Leo Kim 41 Jun 24, 2022
Singer Tap for dbt Artifacts built with the Meltano SDK

tap-dbt-artifacts tap-dbt-artifacts is a Singer tap for dbtArtifacts. Built with the Meltano SDK for Singer Taps.

Prratek Ramchandani 9 Nov 25, 2022
Simulation artifacts, core components and configuration files to integrate AWS DeepRacer device with ROS Navigation stack.

AWS DeepRacer Overview The AWS DeepRacer Evo vehicle is a 1/18th scale Wi-Fi enabled 4-wheel ackermann steering platform that features two RGB cameras

AWS DeepRacer 31 Nov 21, 2022
szrose is an all in one group management bot made for managing your group effectively with some advance security tools & Suit For All Your Needs ❤️

szrose is an all in one group management bot made for managing your group effectively with some advance security tools & Suit For All Your Needs ❤️

szsupunma 93 Jan 7, 2023
A Discord bot that automatically saves SHSH blobs for all of your iOS devices.

AutoTSS AutoTSS is a Discord bot that automatically saves SHSH blobs for all of your iOS devices. Want a CLI automatic blob saver? Check out AutoTSS-c

adam 79 Dec 13, 2022
A python script fetches all your starred repositories from your GitHub account and clones them to your server so you will never lose important resources

A python script fetches all your starred repositories from your GitHub account and clones them to your server so you will never lose important resources

Ringo Hoffmann 27 Oct 1, 2022
Powerful Telegram userbot to turn your PROFILE PICTURE & LAST NAME into a real time clock & to change your BIO automatically.

DATE_TIME_USERBOT-TeLeTiPs Powerful Telegram userbot to turn your PROFILE PICTURE & LAST NAME into a real time clock & to change your BIO automaticall

null 53 Jan 5, 2023
A project that automatically sends you a Medium article on a topic of your choosing to your email address daily.

Daily Article from Medium ✏️ About A project that automatically sends you a Medium article on a topic of your choosing to your email address daily. No

Orhan Emre Dikicigil 2 Apr 27, 2022
A GitHub Action that automatically reports your Advent of Code progress in a table in your README

Advent README Stars This action adds and maintains a stars report in your README based on your Advent of Code progress. Example Table 2021 Results Day

Kevin Duff 36 Dec 30, 2022
Scrape the Twitter Frontend API without authentication.

Twitter Scraper ???? Read Korean Version Twitter's API is annoying to work with, and has lots of limitations — luckily their frontend (JavaScript) has

Buğra İşgüzar 3.4k Jan 8, 2023