原神爬虫 抓取原神界面圣遗物信息

Overview

原神圣遗物半自动爬虫

说明

直接抓取原神界面中的圣遗物数据

目前只适配了背包页面的抓取

准确率:97.5%(普通通用接口,对 40 件随机圣遗物识别,统计完全正确的数量为 39)

准确率:100%(4k 屏幕,普通通用接口,对 110 件圣遗物识别,统计完全正确的数量为 110)
不排除还有小错误的情况,如果发现有错误请提交 issue 反馈!

使用教程

打包好的exe文件在右侧release获取

1.修改 config.ini

配置文件说明

[api]

access_token:百度 ocr access_token

Q:如何获取 access_token?
A:网上有很多方法,百度官方的在:百度官方教程
自 v1.1.0 版本开始 release 中附带获取 access_token 的程序,源码在 GetToken 文件夹

accurate_url/general_url:api 地址,一般不用更改
use:使用高精度还是普通接口(accurate_url/general_url)

[grasp_setting]

window_title:要抓取的窗口名,主要方便 PS 端/手机模拟器使用
left,top,right,bottom:面板在窗口中的位置(按照比例出现,如 left=0.67 表示 left 线段占总窗口的 67%)(典型的 16:9 分辨率使用预置选项即可)
setting

2. 打开原神,进入背包圣遗物界面

3. 在原神中按Alt+Enter进入窗口模式

窗口模式说明

原神默认是以独占全屏的形式出现的,要置顶本窗口必须使其窗口化。
要返回独占全屏同样是按Alt+Enter

4. 运行程序(此时可以隐藏原神窗口)

5. 点击抓取按钮抓取当前显示的圣遗物,点击保存按钮保存

输出

  • 以 json 格式保存到剪贴板
  • 以 excel 形式保存到当前目录的 out.xls

示例图片

进入窗口模式:
ygWHz9.md.png
抓取:
ygW7RJ.md.png
输出表格:
ygWoiF.md.png

LOG

  • 重构、整理代码(2021/2/17)
  • 常见不合理错误纠正(2021/2/18)
  • 去除部分依赖以减小打包体积(已替换 pandas 依赖为 xlrd 和 xlutils,打包体积减半为 38MB)(2021/2/18)
  • 将配置项分离为文件
  • 重构、整理代码
  • 优化抓取速度和反馈(doing)
  • 其他界面抓取
  • 武器等抓取

常见问题

  1. 抓取到启动器怎么回事?
    抓取窗口是判断窗口标题为原神实现的,推荐不使用启动器启动,如果确实抓出来了把抓出的启动器窗口关闭即可。关闭后应该不会再次抓取。
  2. 有封号风险吗?
    抓取的原理是对窗口截图识别,没有对原神本身进行任何修改和干扰,理论上不会产生风险。这都要封号我就不玩了
  3. 为什么半自动?不能全自动?
    先把半自动做好。
  4. 关于百度文字识别?
    可以在通用普通接口的情况下取得除等级外很好的效果,也可以使用高精度接口(每日 500 次免费)获得更好的效果。
  5. 显示效果相关问题?
    作者优先在 4k 环境下开发,但是只要游戏界面比例是典型的 16:9 都可以正常抓取,只是显示效果可能有细微的差距。

致谢

原神圣遗物记录脚本

You might also like...
Releases(v1.1.4)
Owner
hwa
正在探索自己的兴趣点,所以仓库基本是杂乱不堪。某一天终会找到吧。
hwa
TikTok Username Swapper/Claimer/etc

TikTok-Turbo TikTok Username Swapper/Claimer/etc I wanted to create it as fast as possible but i eventually gave up and recoded it many many many many

Kevin 12 Dec 19, 2022
Simple python tool for the purpose of swapping latinic letters with cirilic ones and vice versa in txt, docx and pdf files in Serbian language

Alpha Swap English This is a simple python tool for the purpose of swapping latinic letters with cirylic ones and vice versa, in txt, docx and pdf fil

Aleksandar Damnjanovic 3 May 31, 2022
Scrapes the Sun Life of Canada Philippines web site for historical prices of their investment funds and then saves them as CSV files.

slocpi-scraper Sun Life of Canada Philippines Inc Investment Funds Scraper Install dependencies pip install -r requirements.txt Usage General format:

Daryl Yu 2 Jan 07, 2022
Demonstration on how to use async python to control multiple playwright browsers for web-scraping

Playwright Browser Pool This example illustrates how it's possible to use a pool of browsers to retrieve page urls in a single asynchronous process. i

Bernardas Ališauskas 8 Oct 27, 2022
tweet random sand cat pictures

sandcatbot setup pip3 install --user -r requirements.txt cp sandcatbot.example.conf sandcatbot.conf vim sandcatbot.conf running the first parameter i

jess 8 Aug 07, 2022
New World Market Scraper

Bean Seller A New Worlds market scraper. Deployment This must be installed on Windows as it uses the Windows api to do its stuff Install Prerequisites

4 Sep 21, 2022
WebScraper - A script that prints out a list of all EXTERNAL references in the HTML response to an HTTP/S request

Project A: WebScraper A script that prints out a list of all EXTERNAL references

2 Apr 26, 2022
Footballmapies - Football mapies for learning webscraping and use of gmplot module in python

Footballmapies - Football mapies for learning webscraping and use of gmplot module in python

1 Jan 28, 2022
Web scrapper para cotizar articulos

WebScrapper Este web scrapper esta desarrollado en python 3.10.0 para buscar en la pagina de cyber puerta articulos dentro del catalogo. El programa t

Jordan Gaona 1 Oct 27, 2021
News, full-text, and article metadata extraction in Python 3. Advanced docs:

Newspaper3k: Article scraping & curation Inspired by requests for its simplicity and powered by lxml for its speed: "Newspaper is an amazing python li

Lucas Ou-Yang 12.3k Jan 07, 2023
Auto Join: A GitHub action script to automatically invite everyone to the organization who star your repository.

Auto Invite To The Organization By Star A GitHub Action script to automatically invite everyone to your organization that stars your repository. What

Max Base 11 Dec 11, 2022
A tool for scraping and organizing data from NewsBank API searches

nbscraper Overview This simple tool automates the process of copying, pasting, and organizing data from NewsBank API searches. Curerntly, nbscrape onl

0 Jun 17, 2021
Binance Smart Chain Contract Scraper + Contract Evaluator

Pulls Binance Smart Chain feed of newly-verified contracts every 30 seconds, then checks their contract code for links to socials.Returns only those with socials information included, and then submit

14 Dec 09, 2022
中国大学生在线 四史自动答题刷分(现仅支持英雄篇)

中国大学生在线 “四史”学习教育竞答 自动答题 刷分 (现仅支持英雄篇,已更新可用) 若对您有所帮助,记得点个Star 🌟 !!! 中国大学生在线 “四史”学习教育竞答 自动答题 刷分 (现仅支持英雄篇,已更新可用) 🥰 🥰 🥰 依赖 本项目依赖的第三方库: requests 在终端执行以下

XWhite 229 Dec 12, 2022
PyQuery-based scraping micro-framework.

demiurge PyQuery-based scraping micro-framework. Supports Python 2.x and 3.x. Documentation: http://demiurge.readthedocs.org Installing demiurge $ pip

Matias Bordese 109 Jul 20, 2022
A Python module to bypass Cloudflare's anti-bot page.

cloudscraper A simple Python module to bypass Cloudflare's anti-bot page (also known as "I'm Under Attack Mode", or IUAM), implemented with Requests.

VeNoMouS 2.6k Dec 31, 2022
UsernameScraperTool - Username Scraper Tool With Python

UsernameScraperTool Username Scraper for 40+ Social sites. How To use git clone

E4crypt3d 1 Dec 20, 2022
Scrapes mcc-mnc.com and outputs 3 files with the data (JSON, CSV & XLSX)

mcc-mnc.com-webscraper Scrapes mcc-mnc.com and outputs 3 files with the data (JSON, CSV & XLSX) A Python script for web scraping mcc-mnc.com Link: mcc

Anton Ivarsson 1 Nov 07, 2021
Simple tool to scrape and download cross country ski timings and results from live.skidor.com

LiveSkidorDownload Simple tool to scrape and download cross country ski timings

0 Jan 07, 2022
A Python web scraper to scrape latest posts from official Coinbase's Blog.

Coinbase Blog Scraper A Python web scraper to scrape latest posts from official Coinbase's Blog. IDEA It scrapes up latest blog posts from https://blo

Lucas Villela 3 Feb 18, 2022