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

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
Anonymously scrapes onlinesim.ru for new usable phone numbers.

phone-scraper Anonymously scrapes onlinesim.ru for new usable phone numbers. Usage Clone the repository $ git clone https://github.com/thomasgruebl/ph

16 Oct 08, 2022
Pelican plugin that adds site search capability

Search: A Plugin for Pelican This plugin generates an index for searching content on a Pelican-powered site. Why would you want this? Static sites are

22 Nov 21, 2022
This is a script that scrapes the longitude and latitude on food.grab.com

grab This is a script that scrapes the longitude and latitude for any restaurant in Manila on food.grab.com, location can be adjusted. Search Result p

0 Nov 22, 2021
crypto currency scraping

SCRYPTO What ? Crypto currencies scraping (At the moment, only bitcoin and ethereum crypto currencies are supported) How ? A python script is running

15 Sep 01, 2022
This is a sport analytics project that combines the knowledge of OOP and Webscraping

This is a sport analytics project that combines the knowledge of Object Oriented Programming (OOP) and Webscraping, the weekly scraping of the English Premier league table is carried out to assess th

Dolamu Oludare 1 Nov 26, 2021
A database scraper created with mechanical soup and sqlite

WebscrapingDatabases a database scraper created with mechanical soup and sqlite author: Mariya Sha Watch on YouTube: This repository was created to su

Mariya 30 Aug 08, 2022
A simple reddit scraper to get memes (only images) from r/ProgrammerHumor.

memey A simple reddit scraper to get memes (only images) from r/ProgrammerHumor. Note Only works if you have firefox installed (yet). Instructions foo

2 Nov 16, 2021
Scrap the 42 Intranet's elearning videos in a single click

42intra_scraper Scrap the 42 Intranet's elearning videos in a single click. Why you would want to use it ? Adjust speed at your convenience. (The intr

Noufel 5 Oct 27, 2022
A web scraping pipeline project that retrieves TV and movie data from two sources, then transforms and stores data in a MySQL database.

New to Streaming Scraper An in-progress web scraping project built with Python, R, and SQL. The scraped data are movie and TV show information. The go

Charles Dungy 1 Mar 28, 2022
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
Distributed Crawler Management Framework Based on Scrapy, Scrapyd, Django and Vue.js

Gerapy Distributed Crawler Management Framework Based on Scrapy, Scrapyd, Scrapyd-Client, Scrapyd-API, Django and Vue.js. Documentation Documentation

Gerapy 2.9k Jan 03, 2023
CRI Scrape is a tool for get general info about Italian Red Cross in GAIA Platform

CRI Scrape CRI Scrape is a tool for get general info about Italian Red Cross in GAIA Platform Disclaimer This code is only for educational purpose. So

Vincenzo Cardone 0 Jul 23, 2022
Web-Scrapper using Python and Flask

Web-Scrapper "[초급]Python으로 웹 스크래퍼 만들기" 코스 -NomadCoders 기초적인 Python 문법강의부터 시작하여 웹사이트의 html파일에서 원하는 내용을 Scrapping해서 출력, csv 파일로 저장, flask를 이용한 간단한 웹페이지

윤성도 1 Nov 10, 2021
A Python Oriented tool to Scrap WhatsApp Group Link using Google Dork it Scraps Whatsapp Group Links From Google Results And Gives Working Links.

WaGpScraper A Python Oriented tool to Scrap WhatsApp Group Link using Google Dork it Scraps Whatsapp Group Links From Google Results And Gives Working

Muhammed Rizad 27 Dec 18, 2022
自动完成每日体温上报(Github Actions)

体温上报助手 简介 每天 10:30 GMT+8 自动完成体温上报,如想修改定时运行的时间,可修改 .github/workflows/SduHealthReport.yml 中 schedule 属性。 如果当日有异常,请手动在小程序端/PC 端填写!

Teng Zhang 23 Sep 15, 2022
Pseudo API for Google Trends

pytrends Introduction Unofficial API for Google Trends Allows simple interface for automating downloading of reports from Google Trends. Only good unt

General Mills 2.6k Dec 28, 2022
Automatically scrapes all menu items from the Taco Bell website

Automatically scrapes all menu items from the Taco Bell website. Returns as PANDAS dataframe.

Sasha 2 Jan 15, 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
A web scraper for nomadlist.com, made to avoid website restrictions.

Gypsylist gypsylist.py is a web scraper for nomadlist.com, made to avoid website restrictions. nomadlist.com is a website with a lot of information fo

Alessio Greggi 5 Nov 24, 2022
SkyScrapers: A collection of variety of Scraping Apps

SkyScrapers Collection of variety of Web Scraping Apps The web-scrapers involved

Biplov Pokhrel 3 Feb 17, 2022