├── .gitattributes ├── .gitignore ├── Genshin_query ├── YuanShen_User_Info │ ├── LICENSE │ ├── README.md │ ├── __init__.py │ ├── cookie_set.py │ ├── id2name.json │ ├── mys_cookies.db │ ├── settings.py │ └── ys_UserInfoGet.py ├── __init__.py ├── apis.py ├── functions.py ├── image_generate.py ├── piltools.py ├── res │ ├── bg.png │ ├── charicon │ │ ├── 10000003.png │ │ ├── 10000016.png │ │ ├── 10000022.png │ │ ├── 10000023.png │ │ ├── 10000024.png │ │ ├── 10000025.png │ │ ├── 10000030.png │ │ ├── 10000031.png │ │ ├── 10000032.png │ │ ├── 10000033.png │ │ ├── 10000037.png │ │ ├── 10000038.png │ │ ├── 10000039.png │ │ ├── 10000041.png │ │ ├── 10000047.png │ │ ├── 10000052.png │ │ └── small │ │ │ ├── 10000016.png │ │ │ ├── 10000023.png │ │ │ ├── 10000025.png │ │ │ ├── 10000032.png │ │ │ ├── 10000033.png │ │ │ ├── 10000047.png │ │ │ └── 10000052.png │ ├── floor_bg.png │ ├── font │ │ └── hanyiwenhei.ttf │ └── img │ │ ├── UI_HomeworldModule_1_Pic.png │ │ ├── UI_HomeworldModule_2_Pic.png │ │ ├── UI_HomeworldModule_3_Pic.png │ │ ├── UI_HomeworldModule_4_Pic.png │ │ ├── baoxiang.png │ │ ├── charres │ │ ├── 4.png │ │ ├── 5.png │ │ ├── char_4.png │ │ ├── char_5.png │ │ ├── char_r_4.png │ │ └── char_r_5.png │ │ ├── chuansongdian.png │ │ ├── floor10.png │ │ ├── floor11.png │ │ ├── floor12.png │ │ ├── floor9.png │ │ ├── floors │ │ ├── floor10.png │ │ ├── floor11.png │ │ ├── floor12.png │ │ ├── floor9.png │ │ ├── henggang1.png │ │ └── shugang1.png │ │ ├── gu.png │ │ ├── icon_k.png │ │ ├── icon_y.png │ │ ├── mijing.png │ │ ├── rates │ │ ├── 1_star_bg.png │ │ ├── 2_star_bg.png │ │ ├── 3_star_bg.png │ │ ├── 4_star_bg.png │ │ ├── 5_star_bg.png │ │ ├── anemo.png │ │ ├── cryo.png │ │ ├── dendro.png │ │ ├── electro.png │ │ ├── geo.png │ │ ├── hydro.png │ │ └── pyro.png │ │ ├── shentong.png │ │ ├── sjlxbg.jpg │ │ └── 圆角六角星.png ├── res_honkai │ ├── abyss_report_card_bg.png │ ├── bg.png │ ├── bg_battles.png │ ├── cache │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60103.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60105.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60205.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60311.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60313.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60504.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60611.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60612.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60705.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F62101.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F62301.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F62401.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrJiXieSmall.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrLiangZiSmall.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrShengWuSmall.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrXuShuSmall.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrYiNengSmall.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarIcon%2F2301.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarIcon%2F302_04_01.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FElfCardIcons%2FElf_10001.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FElfCardIcons%2FElf_10002.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FElfCardIcons%2FElf_10012.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FBOSS_150_M01_SSS.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FBOSS_160.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FBOSS_180.png │ │ ├── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FBOSS_210_P3.png │ │ └── https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FDG_063.png │ ├── circle.png │ ├── font │ │ └── msyhb.ttf │ ├── icon_circle_i.png │ ├── icon_circle_o.png │ ├── masks │ │ ├── black_mask.png │ │ └── white_mask.png │ └── rates │ │ ├── a.png │ │ ├── b.png │ │ ├── s.png │ │ ├── ss.png │ │ └── sss.png ├── structs.py └── temp │ └── temp ├── LICENSE ├── README.md ├── design_psd.7z ├── example_bh3.jpg ├── example_ys_abyss.jpg ├── example_ys_info.jpg └── run.py /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /Genshin_query/YuanShen_User_Info/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Womsxd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Genshin_query/YuanShen_User_Info/README.md: -------------------------------------------------------------------------------- 1 | # YuanShen_User_Info 2 | 原神个人信息查询 3 | 4 | 写这玩意的原因的方便直接拆穿网图装x的sb 5 | 6 | 希望米哈游官方人员看到了也别和谐( 7 | 8 | # 用法 9 | 10 | 在settings.py中填写自己的cookie后: 11 | 12 | ​ 直接运行`ys_UserInfoGet.py` 13 | 14 | ​ 或者运行: 15 | 16 | ​ `ys_UserInfoGet.py [uid1] [uid2] [uid3] ……` 17 | 18 | ## 获取Cookie方法 19 | 20 | 21 | 1. 浏览器**无痕模式**打开 [https://bbs.mihoyo.com/ys/](https://bbs.mihoyo.com/ys/) ,登录账号 22 | 2. 打开[https://api-takumi.mihoyo.com/binding/api/getUserGameRolesByCookie](https://api-takumi.mihoyo.com/binding/api/getUserGameRolesByCookie),(这个在这里获取Cookie并不会触发`Debugger`,当然也可以忽略这个步骤) 23 | 3. 按`F12`,打开`开发者工具`,找到并点击`Network` 24 | 4. 按`F5`刷新页面,按下图复制 Cookie: 25 | 26 | ![How to get mys cookie](https://i.loli.net/2020/10/28/TMKC6lsnk4w5A8i.png) 27 | 28 | 当触发`Debugger`时,可尝试按`Ctrl + F8`关闭,然后再次刷新页面,最后复制 Cookie。也可以使用另一种方法: 29 | 30 | 1. 复制代码 `var cookie=document.cookie;var ask=confirm('Cookie:'+cookie+'\n\nDo you want to copy the cookie to the clipboard?');if(ask==true){copy(cookie);msg=cookie}else{msg='Cancel'}` 31 | 2. 浏览器**无痕模式**打开 [https://bbs.mihoyo.com/ys/](https://bbs.mihoyo.com/ys/) ,登录账号 32 | 3. 按`F12`,打开`开发者工具`,找到并点击`Console` 33 | 4. 控制台粘贴代码并运行,获得类似`Cookie:xxxxxx`的输出信息 34 | 5. `xxxxxx`部分即为所需复制的 Cookie,点击确定复制 35 | 36 | 37 | # 感谢列表: 38 | 39 | [Steesha](https://github.com/Steesha):帮忙拿到了DS的算法 40 | -------------------------------------------------------------------------------- /Genshin_query/YuanShen_User_Info/__init__.py: -------------------------------------------------------------------------------- 1 | from . import ys_UserInfoGet 2 | from . import cookie_set 3 | -------------------------------------------------------------------------------- /Genshin_query/YuanShen_User_Info/cookie_set.py: -------------------------------------------------------------------------------- 1 | import sqlite3 2 | import time 3 | import os 4 | 5 | 6 | def timestamp_to_text(timestamp: int, _format="%Y-%m-%d %H:%M:%S"): 7 | """ 8 | 9 | :param timestamp: 时间戳,若输入13位时间戳则自动转为10位 10 | :param _format: 格式,默认"%Y-%m-%d %H:%M:%S" 11 | :return: %Y-%m-%d %H:%M:%S -> str 12 | """ 13 | if(timestamp > 9999999999): # 13位时间戳转10位 14 | timestamp = timestamp / 1000 15 | ret = time.strftime(_format, time.localtime(timestamp)) 16 | return(ret) 17 | 18 | class MoHoYoCookie: 19 | def __init__(self): 20 | self.spath = os.path.split(__file__)[0] 21 | self.conn = sqlite3.connect(f"{self.spath}/mys_cookies.db", check_same_thread=False) 22 | self.cursor = self.conn.cursor() 23 | self.day = timestamp_to_text(int(time.time()), "%Y%m%d") 24 | self.closed = False 25 | 26 | def check_limit(self, cid=-1, cookie=None, to_limit=False, remove=False): 27 | ret = False 28 | day = self.day 29 | # ts = int(time.time() * 1000) 30 | # conn = self.conn 31 | cursor = self.cursor 32 | 33 | if to_limit: 34 | # cursor.execute(f"CREATE TABLE IF NOT EXISTS '{day}' ('id' INTEGER NOT NULL,'times' integer," 35 | # f"'limit' integer,PRIMARY KEY ('id'));") 36 | # cursor.execute(f"INSERT INTO limit (id, limit) VALUES (?, ?)", [cid, 1]) 37 | if cookie is not None: 38 | cursor.execute("UPDATE cookies SET lastlimittime = ? WHERE cookie = ?", [day, cookie]) 39 | else: 40 | cursor.execute("UPDATE cookies SET lastlimittime = ? WHERE id = ?", [day, cid]) 41 | ret = True 42 | 43 | if remove: 44 | if cookie is not None: 45 | cursor.execute("DELETE FROM cookies WHERE cookie = ?", [cookie]) 46 | else: 47 | cursor.execute("DELETE FROM cookies WHERE id = ?", [cid]) 48 | ret = True 49 | 50 | if cookie is not None: 51 | check = cursor.execute("SELECT id, cookie, lastlimittime FROM cookies WHERE cookie = ?", [cookie]).fetchone() 52 | else: 53 | check = cursor.execute("SELECT id, cookie, lastlimittime FROM cookies WHERE id = ?", [cid]).fetchone() 54 | 55 | if check is None: 56 | ret = True 57 | else: 58 | lastlimittime = check[2] 59 | if lastlimittime == day: 60 | ret = True 61 | 62 | self.conn.commit() 63 | return ret 64 | 65 | def get_cookie_list(self): 66 | cks = self.cursor.execute("SELECT id, cookie, lastlimittime FROM cookies WHERE lastlimittime != ?", [self.day]) 67 | return cks.fetchall() 68 | 69 | def close_connect(self): 70 | self.cursor.close() 71 | self.conn.close() 72 | self.closed = True 73 | 74 | def __del__(self): 75 | if not self.closed: 76 | self.close_connect() 77 | 78 | 79 | # print(MoHoYoCookie().check_limit(2, remove=True)) 80 | # print(MoHoYoCookie().get_cookie_list()) 81 | -------------------------------------------------------------------------------- /Genshin_query/YuanShen_User_Info/id2name.json: -------------------------------------------------------------------------------- 1 | { 2 | "10000003": "琴", 3 | "10000005": "旅行者", 4 | "10000006": "丽莎", 5 | "10000007": "旅行者", 6 | "10000014": "芭芭拉", 7 | "10000015": "凯亚", 8 | "10000016": "迪卢克", 9 | "10000020": "雷泽", 10 | "10000021": "安柏", 11 | "10000022": "温迪", 12 | "10000023": "香菱", 13 | "10000024": "北斗", 14 | "10000025": "行秋", 15 | "10000027": "凝光", 16 | "10000029": "可莉", 17 | "10000031": "菲谢尔", 18 | "10000032": "班尼特", 19 | "10000033": "达达利亚", 20 | "10000034": "诺艾尔", 21 | "10000036": "重云", 22 | "10000039": "迪奥娜", 23 | "10000041": "莫娜", 24 | "10000042": "刻晴", 25 | "10000043": "砂糖", 26 | "注释1": "10000005/7分别对应哥哥和妹妹" 27 | } -------------------------------------------------------------------------------- /Genshin_query/YuanShen_User_Info/mys_cookies.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/YuanShen_User_Info/mys_cookies.db -------------------------------------------------------------------------------- /Genshin_query/YuanShen_User_Info/settings.py: -------------------------------------------------------------------------------- 1 | #coding:utf-8 2 | 3 | mhyVersion = "2.11.1" 4 | salt = "xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs" # Github-@lulu666lulu 5 | client_type = "5" 6 | 7 | os_mhyVersion = "1.5.0" 8 | os_salt = "6cqshh5dhw73bzxn20oexa9k516chk7s" 9 | os_client_type = "4" 10 | 11 | cache_Cookie = "" -------------------------------------------------------------------------------- /Genshin_query/YuanShen_User_Info/ys_UserInfoGet.py: -------------------------------------------------------------------------------- 1 | # https://github.com/Womsxd/YuanShen_User_Info 2 | import os 3 | import re 4 | import sys 5 | import json 6 | import time 7 | import string 8 | import random 9 | import hashlib 10 | import requests 11 | 12 | from .settings import * 13 | from . import cookie_set 14 | 15 | 16 | def md5(text): 17 | md5 = hashlib.md5() 18 | md5.update(text.encode()) 19 | return md5.hexdigest() 20 | 21 | # Github-@lulu666lulu https://github.com/Azure99/GenshinPlayerQuery/issues/20 22 | ''' 23 | {body:"",query:{"action_ticket": undefined, "game_biz": "hk4e_cn”}} 24 | 对应 https://api-takumi.mihoyo.com/binding/api/getUserGameRolesByCookie?game_biz=hk4e_cn //查询米哈游账号下绑定的游戏(game_biz可留空) 25 | {body:"",query:{"uid": 12345(被查询账号米哈游uid)}} 26 | 对应 https://api-takumi.mihoyo.com/game_record/app/card/wapi/getGameRecordCard?uid= 27 | {body:"",query:{'role_id': '查询账号的uid(游戏里的)' ,'server': '游戏服务器'}} 28 | 对应 https://api-takumi.mihoyo.com/game_record/app/genshin/api/index?server= server信息 &role_id= 游戏uid 29 | {body:"",query:{'role_id': '查询账号的uid(游戏里的)' , 'schedule_type': 1(我这边只看到出现过1和2), 'server': 'cn_gf01'}} 30 | 对应 https://api-takumi.mihoyo.com/game_record/app/genshin/api/spiralAbyss?schedule_type=1&server= server信息 &role_id= 游戏uid 31 | {body:"",query:{game_id: 2(目前我知道有崩坏3是1原神是2)}} 32 | 对应 https://api-takumi.mihoyo.com/game_record/app/card/wapi/getAnnouncement?game_id= 这个是公告api 33 | b=body q=query 34 | 其中b只在post的时候有内容,q只在get的时候有内容 35 | ''' 36 | def DSGet(query:str): 37 | n = salt 38 | i = str(int(time.time())) 39 | r = str(random.randint(100001, 200000)) 40 | b = "" 41 | q = query 42 | c = md5("salt=" + n + "&t=" + i + "&r=" + r + "&b=" + b + "&q=" + q) 43 | return i + "," + r + "," + c 44 | 45 | def OSDSGet(): 46 | n = os_salt 47 | i = str(int(time.time())) 48 | r = str(random.randint(100001, 200000)) 49 | c = md5("salt=" + n + "&t=" + i + "&r=" + r) 50 | return i + "," + r + "," + c 51 | 52 | def Cookie_get(): 53 | # spath = os.path.split(__file__)[0] # .py真实位置 54 | cookies = cookie_set.MoHoYoCookie().get_cookie_list() 55 | if not cookies: 56 | raise LookupError("Error: no enough cookie, 请联系Bot管理员解决~") 57 | 58 | randint = random.randint(0, len(cookies) - 1) 59 | return cookies[randint][1] 60 | 61 | 62 | def GetInfo(uid, ServerID, overseas=False): 63 | ck = Cookie_get() 64 | if overseas: 65 | req = requests.get( 66 | url="https://api-os-takumi.mihoyo.com/game_record/genshin/api/index?server=" + ServerID + "&role_id=" + uid, 67 | headers={ 68 | 'Accept': 'application/json, text/plain, */*', 69 | 'DS': OSDSGet(), 70 | 'Origin': 'https://webstatic.mihoyo.com', 71 | 'x-rpc-app_version': os_mhyVersion, 72 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 9; Unspecified Device) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/39.0.0.0 Mobile Safari/537.36 miHoYoBBS/2.2.0', 73 | 'x-rpc-client_type': os_client_type, 74 | 'Referer': 'https://webstatic.mihoyo.com/app/community-game-records/index.html?v=6', 75 | 'Accept-Encoding': 'gzip, deflate', 76 | 'Accept-Language': 'zh-CN,en-US;q=0.8', 77 | 'X-Requested-With': 'com.mihoyo.hyperion', 78 | "Cookie": ck 79 | } 80 | ) 81 | else: 82 | req = requests.get( 83 | url="https://api-takumi.mihoyo.com/game_record/app/genshin/api/index?server=" + ServerID + "&role_id=" + uid, 84 | headers={ 85 | 'Accept': 'application/json, text/plain, */*', 86 | 'DS': DSGet("role_id=" + uid + "&server=" + ServerID), 87 | 'Origin': 'https://webstatic.mihoyo.com', 88 | 'x-rpc-app_version': mhyVersion, 89 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 9; Unspecified Device) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/39.0.0.0 Mobile Safari/537.36 miHoYoBBS/2.2.0', 90 | 'x-rpc-client_type': client_type, 91 | 'Referer': 'https://webstatic.mihoyo.com/app/community-game-records/index.html?v=6', 92 | 'Accept-Encoding': 'gzip, deflate', 93 | 'Accept-Language': 'zh-CN,en-US;q=0.8', 94 | 'X-Requested-With': 'com.mihoyo.hyperion', 95 | "Cookie": ck 96 | } 97 | ) 98 | return [req.text, ck] 99 | 100 | def set_cookie(cookie: str): 101 | spath = os.path.split(__file__)[0] # .py真实位置 102 | with open(f"{spath}/cookie.txt", "w", encoding="utf8") as f: 103 | f.write(cookie) 104 | 105 | return cookie 106 | 107 | def shenjingluoxuan(uid, ServerID="cn_gf01", Schedule_type="1"): 108 | ck = Cookie_get() 109 | url = "https://api-takumi.mihoyo.com/game_record/app/genshin/api/spiralAbyss?schedule_type=" + Schedule_type + "&server=" + ServerID + "&role_id=" + uid 110 | headers = { 111 | 'DS': DSGet("role_id=" + uid + "&schedule_type=" + Schedule_type + "&server=" + ServerID), 112 | 'Origin': 'https://webstatic.mihoyo.com', 113 | 'Cookie': ck, 114 | 'x-rpc-app_version': mhyVersion, 115 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) miHoYoBBS/2.11.1', 116 | 'x-rpc-client_type': '5', 117 | 'Referer': 'https://webstatic.mihoyo.com/' 118 | } 119 | req = requests.get(url, headers=headers) 120 | return [req.text, ck] 121 | 122 | 123 | def honkai_baseinfo(Uid, ServerID="android01"): 124 | ck = Cookie_get() 125 | url = f"https://api-takumi.mihoyo.com/game_record/app/honkai3rd/api/index?server={ServerID}&role_id={Uid}" 126 | headers = { 127 | 'DS': DSGet("role_id=" + Uid + "&server=" + ServerID), 128 | 'Origin': 'https://webstatic.mihoyo.com', 129 | 'Cookie': ck, 130 | 'x-rpc-app_version': mhyVersion, 131 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) miHoYoBBS/2.11.1', 132 | 'x-rpc-client_type': '5', 133 | 'Referer': 'https://webstatic.mihoyo.com/' 134 | } 135 | req = requests.get(url, headers=headers) 136 | return [req.text, ck] 137 | 138 | def honkai_old_abyss(Uid, ServerID): # 高级区深渊 139 | ck = Cookie_get() 140 | url = f"https://api-takumi.mihoyo.com/game_record/app/honkai3rd/api/latestOldAbyssReport?server={ServerID}&role_id={Uid}" 141 | headers = { 142 | 'DS': DSGet("role_id=" + Uid + "&server=" + ServerID), 143 | 'Origin': 'https://webstatic.mihoyo.com', 144 | 'Cookie': ck, 145 | 'x-rpc-app_version': mhyVersion, 146 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) miHoYoBBS/2.11.1', 147 | 'x-rpc-client_type': '5', 148 | 'Referer': 'https://webstatic.mihoyo.com/' 149 | } 150 | req = requests.get(url, headers=headers) 151 | return [req.text, ck] 152 | 153 | def honkai_new_abyss(Uid, ServerID): # 终级区深渊 154 | ck = Cookie_get() 155 | url = f"https://api-takumi.mihoyo.com/game_record/app/honkai3rd/api/newAbyssReport?server={ServerID}&role_id={Uid}" 156 | headers = { 157 | 'DS': DSGet("role_id=" + Uid + "&server=" + ServerID), 158 | 'Origin': 'https://webstatic.mihoyo.com', 159 | 'Cookie': ck, 160 | 'x-rpc-app_version': mhyVersion, 161 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) miHoYoBBS/2.11.1', 162 | 'x-rpc-client_type': '5', 163 | 'Referer': 'https://webstatic.mihoyo.com/' 164 | } 165 | req = requests.get(url, headers=headers) 166 | return [req.text, ck] 167 | 168 | def honkai_battle(Uid, ServerID): # 战场 169 | ck = Cookie_get() 170 | url = f"https://api-takumi.mihoyo.com/game_record/app/honkai3rd/api/battleFieldReport?server={ServerID}&role_id={Uid}" 171 | headers = { 172 | 'DS': DSGet("role_id=" + Uid + "&server=" + ServerID), 173 | 'Origin': 'https://webstatic.mihoyo.com', 174 | 'Cookie': ck, 175 | 'x-rpc-app_version': mhyVersion, 176 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) miHoYoBBS/2.11.1', 177 | 'x-rpc-client_type': '5', 178 | 'Referer': 'https://webstatic.mihoyo.com/' 179 | } 180 | req = requests.get(url, headers=headers) 181 | return [req.text, ck] 182 | 183 | def honkai_weekly_report(Uid, ServerID): # 周报 184 | ck = Cookie_get() 185 | url = f"https://api-takumi.mihoyo.com/game_record/app/honkai3rd/api/weeklyReport?server={ServerID}&role_id={Uid}" 186 | headers = { 187 | 'DS': DSGet("role_id=" + Uid + "&server=" + ServerID), 188 | 'Origin': 'https://webstatic.mihoyo.com', 189 | 'Cookie': ck, 190 | 'x-rpc-app_version': mhyVersion, 191 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) miHoYoBBS/2.11.1', 192 | 'x-rpc-client_type': '5', 193 | 'Referer': 'https://webstatic.mihoyo.com/' 194 | } 195 | req = requests.get(url, headers=headers) 196 | return [req.text, ck] 197 | 198 | 199 | def getmysinfo(Uid): 200 | url = "https://api-takumi.mihoyo.com/game_record/card/wapi/getGameRecordCard?uid=" + Uid 201 | ck = Cookie_get() 202 | headers = { 203 | 'DS': DSGet("uid=" + Uid), 204 | 'x-rpc-app_version': mhyVersion, 205 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) miHoYoBBS/2.11.1', 206 | 'x-rpc-client_type': '5', 207 | 'Referer': 'https://webstatic.mihoyo.com/', 208 | "Cookie": ck} 209 | req = requests.get(url, headers=headers) 210 | return [req.text, ck] 211 | 212 | 213 | 214 | -------------------------------------------------------------------------------- /Genshin_query/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | from . import functions 3 | -------------------------------------------------------------------------------- /Genshin_query/apis.py: -------------------------------------------------------------------------------- 1 | from . import YuanShen_User_Info 2 | import json 3 | from .structs import MYSdata, MhyQueryErrors, GenshinUserData, GenshinShenJingLuoXuan, HonKai3UserInfo, \ 4 | HonKai3BattleFieldInfo, OldAbyss, NewAbyss, HonKaiWeeklyReport 5 | from typing import List 6 | 7 | def errorraise(code, cookie: str): 8 | retcode = str(code) 9 | if retcode == "10001": 10 | raise MhyQueryErrors.CookieOutDateError(cookie) 11 | elif retcode == "10102": 12 | raise MhyQueryErrors.MiYouSheError("用户设置了隐私") 13 | elif retcode == "10101": 14 | raise MhyQueryErrors.CookieLimit(cookie) 15 | 16 | else: 17 | pass 18 | 19 | def getmysinfo(mysid: str) -> List[MYSdata]: 20 | data = YuanShen_User_Info.ys_UserInfoGet.getmysinfo(mysid) 21 | jsondata = json.loads(data[0]) 22 | retcode = jsondata["retcode"] 23 | 24 | errorraise(retcode, data[1]) 25 | 26 | return [MYSdata(**data) for data in jsondata["data"]["list"]] 27 | 28 | def getgenshininfo(uid: str, server: str, is_oversea: bool): 29 | data = YuanShen_User_Info.ys_UserInfoGet.GetInfo(uid, server, is_oversea) 30 | jsondata = json.loads(data[0]) 31 | retcode = jsondata["retcode"] 32 | 33 | errorraise(retcode, data[1]) 34 | 35 | return GenshinUserData(**jsondata["data"]) 36 | 37 | def getgenshinsjlxinfo(uid: str, sever: str): 38 | data = YuanShen_User_Info.ys_UserInfoGet.shenjingluoxuan(uid, sever) 39 | jsondata = json.loads(data[0]) 40 | retcode = jsondata["retcode"] 41 | 42 | errorraise(retcode, data[1]) 43 | 44 | return GenshinShenJingLuoXuan(**jsondata["data"]) 45 | 46 | def gethongkaiuserinfo(uid: str, server: str): # 用户基本信息 47 | data = YuanShen_User_Info.ys_UserInfoGet.honkai_baseinfo(uid, server) 48 | jsondata = json.loads(data[0]) 49 | retcode = jsondata["retcode"] 50 | 51 | errorraise(retcode, data[1]) 52 | 53 | return HonKai3UserInfo(**jsondata["data"]) 54 | 55 | def gethongkaiuserbattlefield(uid: str, server: str): # 战场 56 | data = YuanShen_User_Info.ys_UserInfoGet.honkai_battle(uid, server) 57 | jsondata = json.loads(data[0]) 58 | retcode = jsondata["retcode"] 59 | 60 | errorraise(retcode, data[1]) 61 | 62 | return HonKai3BattleFieldInfo(**jsondata["data"]) 63 | 64 | def gethongkaiuseroldabyss(uid: str, server: str): # 旧深渊 65 | data = YuanShen_User_Info.ys_UserInfoGet.honkai_old_abyss(uid, server) 66 | jsondata = json.loads(data[0]) 67 | retcode = jsondata["retcode"] 68 | 69 | errorraise(retcode, data[1]) 70 | 71 | return OldAbyss(**jsondata["data"]) 72 | 73 | def gethongkaiusernewabyss(uid: str, server: str): # 新深渊 74 | data = YuanShen_User_Info.ys_UserInfoGet.honkai_new_abyss(uid, server) 75 | jsondata = json.loads(data[0]) 76 | retcode = jsondata["retcode"] 77 | 78 | errorraise(retcode, data[1]) 79 | 80 | return NewAbyss(**jsondata["data"]) 81 | 82 | def gethongkaiweeklyreport(uid: str, server: str): # 新深渊 83 | data = YuanShen_User_Info.ys_UserInfoGet.honkai_weekly_report(uid, server) 84 | jsondata = json.loads(data[0]) 85 | retcode = jsondata["retcode"] 86 | 87 | errorraise(retcode, data[1]) 88 | 89 | return HonKaiWeeklyReport(**jsondata["data"]) 90 | 91 | # print(YuanShen_User_Info.ys_UserInfoGet.getmysinfo("19070211")) 92 | # print("\n") 93 | # print(YuanShen_User_Info.ys_UserInfoGet.GetInfo("123081088", "cn_gf01", False)) 94 | # print(YuanShen_User_Info.ys_UserInfoGet.shenjingluoxuan("101101100", "cn_gf01")) 95 | 96 | # print(getmysinfo("73785562")) 97 | # print("\n") 98 | # print(getgenshininfo("19070211", "cn_gf01", False)) 99 | 100 | # a = gethongkaiuserbattlefield("154018449", "hun02") 101 | # print(a) 102 | -------------------------------------------------------------------------------- /Genshin_query/functions.py: -------------------------------------------------------------------------------- 1 | from . import apis 2 | from . structs import MhyQueryErrors, HonkaiUserInfoAll 3 | from typing import Optional, Union, Tuple 4 | from . import image_generate 5 | 6 | 7 | class MysInfo: 8 | def __init__(self, mysid: str): 9 | self.mysid = str(mysid) 10 | self.mysinfo = apis.getmysinfo(self.mysid) 11 | 12 | def getmysinfo(self): 13 | return self.mysinfo 14 | 15 | def get_gameinfo_with_gameid(self, gameid: int): 16 | """ 17 | 18 | :param gameid: 崩崩崩-1; 原神-2 19 | :return: 20 | """ 21 | for _data in self.getmysinfo(): 22 | if gameid == _data.game_id: 23 | return _data 24 | 25 | raise MhyQueryErrors.UserDataError("游戏未绑定") 26 | 27 | class QueryHonKai: 28 | def __init__(self, mysid: Union[int, str]): 29 | self.mysid = str(mysid) 30 | self.mys = MysInfo(self.mysid) 31 | 32 | self.honkaiuid = self.mys.get_gameinfo_with_gameid(1).game_role_id 33 | self.honkaisever = self.mys.get_gameinfo_with_gameid(1).region 34 | 35 | def get_miyoushe_info(self): 36 | return self.mys.get_gameinfo_with_gameid(1) 37 | 38 | def get_honkai_baseinfo(self): 39 | return apis.gethongkaiuserinfo(str(self.honkaiuid), self.honkaisever) 40 | 41 | def get_honkai_new_abyss(self): 42 | return apis.gethongkaiusernewabyss(str(self.honkaiuid), self.honkaisever) 43 | 44 | def get_honkai_old_abyss(self): 45 | return apis.gethongkaiuseroldabyss(str(self.honkaiuid), self.honkaisever) 46 | 47 | def get_honkai_battlefield(self): 48 | return apis.gethongkaiuserbattlefield(str(self.honkaiuid), self.honkaisever) 49 | 50 | def get_honkai_weekly_report(self): 51 | return apis.gethongkaiweeklyreport(str(self.honkaiuid), self.honkaisever) 52 | 53 | 54 | class QueryGenshin: 55 | def __init__(self, mysid: Optional[Union[int, str]], genshinuid: Optional[Union[int, str]]): 56 | """ 57 | 58 | :param mysid: 原神uid优先, 若此项为空, 则不可使用 get_miyoushe_info() 方法 59 | :param genshinuid: 若此项不为None, 则查询填入的uid 60 | """ 61 | self.mysid = str(mysid) if mysid is not None else mysid 62 | self.genshinuid = str(genshinuid) if genshinuid is not None else genshinuid 63 | 64 | if self.mysid is not None: 65 | self.mys = MysInfo(mysid) 66 | 67 | if genshinuid is None: 68 | self.genshinuid = str(self.mys.get_gameinfo_with_gameid(2).game_role_id) 69 | 70 | @staticmethod 71 | def uid2server(uid: str) -> Tuple[str, bool]: 72 | ordict = {"1": "cn_gf01", "2": "cn_gf01", # 国服 73 | "5": "cn_qd01", # B服 74 | "6": "os_usa", "7": "os_euro", "8": "os_asia", "9": "os_cht"} # 海外服 75 | overseas = ["6", "7", "8", "9"] 76 | _u = uid[0] 77 | if _u in ordict: 78 | user_server = ordict[_u] 79 | else: 80 | raise MhyQueryErrors.UserDataError(f"Wrong UID: {uid}") 81 | is_oversea = True if _u in overseas else False 82 | return (user_server, is_oversea) 83 | 84 | def get_gensin_info(self): 85 | if self.genshinuid is not None: 86 | severs = self.uid2server(self.genshinuid) 87 | 88 | elif self.mysid is not None: 89 | self.genshinuid = str(self.mys.get_gameinfo_with_gameid(2).game_id) 90 | severs = self.uid2server(self.genshinuid) 91 | 92 | else: 93 | raise MhyQueryErrors.UserDataError("unknown para") 94 | 95 | return apis.getgenshininfo(self.genshinuid, severs[0], severs[1]) 96 | 97 | def get_miyoushe_info(self): 98 | return self.mys.get_gameinfo_with_gameid(2) 99 | 100 | def get_sjlx_info(self): 101 | if self.genshinuid is not None: 102 | severs = self.uid2server(self.genshinuid) 103 | elif self.mysid is not None: 104 | self.genshinuid = str(self.mys.get_gameinfo_with_gameid(2).game_id) 105 | severs = self.uid2server(self.genshinuid) 106 | else: 107 | raise MhyQueryErrors.UserDataError("unknown para") 108 | 109 | return apis.getgenshinsjlxinfo(self.genshinuid, severs[0]) 110 | 111 | 112 | def generate_genshin_baseinfo(mysid): 113 | q = QueryGenshin(mysid=mysid, genshinuid=None) 114 | return image_generate.GenshinGenerate(mysdata=q.get_miyoushe_info(), genshindata=q.get_gensin_info()).generate() 115 | 116 | def generate_genshin_sjlxinfo(mysid): 117 | q = QueryGenshin(mysid=mysid, genshinuid=None) 118 | return image_generate.GenshinGenerate(mysdata=q.get_miyoushe_info(), 119 | genshindata=q.get_gensin_info()).generate_sjlx(q.get_sjlx_info()) 120 | 121 | def generate_honkai_userinfo(mysid): 122 | q = QueryHonKai(mysid=mysid) 123 | baseinfo = q.get_honkai_baseinfo() 124 | all_userinfo = HonkaiUserInfoAll(baseinfo, q.get_honkai_battlefield(), q.get_honkai_weekly_report()) 125 | if baseinfo.role.level <= 80: 126 | new_abyss = None 127 | old_abyss = q.get_honkai_old_abyss() 128 | else: 129 | new_abyss = q.get_honkai_new_abyss() 130 | old_abyss = None 131 | 132 | return image_generate.HonKaiGenerate(mysdata=q.get_miyoushe_info(), userinfo=all_userinfo, 133 | old_abyss=old_abyss, new_abyss=new_abyss).generate() 134 | -------------------------------------------------------------------------------- /Genshin_query/image_generate.py: -------------------------------------------------------------------------------- 1 | from PIL import Image, ImageFont, ImageDraw, ImageOps 2 | from .structs import GenshinUserData, MYSdata, GenshinUserCharacher, GenshinShenJingLuoXuan, GenshinSJLXFloors, \ 3 | GenshinSJLXFloorInfoBattlesAvatars, MhyQueryErrors, HonkaiUserInfoAll, OldAbyss, NewAbyss, HonKai3BattleFieldReportsBattleInfo 4 | from . import piltools 5 | import os 6 | import requests 7 | import random 8 | import time 9 | from typing import Optional 10 | import urllib.parse 11 | 12 | 13 | def timestamp_to_text(timestamp: int, _format="%Y-%m-%d %H:%M:%S"): 14 | """ 15 | 16 | :param timestamp: 时间戳,若输入13位时间戳则自动转为10位 17 | :param _format: 格式,默认"%Y-%m-%d %H:%M:%S" 18 | :return: %Y-%m-%d %H:%M:%S -> str 19 | """ 20 | if(timestamp > 9999999999): # 13位时间戳转10位 21 | timestamp = timestamp / 1000 22 | ret = time.strftime(_format, time.localtime(timestamp)) 23 | return(ret) 24 | 25 | class GenshinGenerate: 26 | def __init__(self, mysdata: MYSdata, genshindata: GenshinUserData): 27 | self.mysdata = mysdata 28 | self.genshindata = genshindata 29 | self.spath = os.path.split(__file__)[0] # .py真实位置 30 | 31 | def draw_character(self, char: GenshinUserCharacher) -> Image: 32 | spath = self.spath 33 | pt = Image.new("RGBA", (256, 256), 0) 34 | 35 | _im = Image.open(f"{spath}/res/img/charres/{char.rarity}.png") # 稀有度底色 36 | piltools.paste_image(pt, _im, 0, 0, 256, 256, with_mask=True) 37 | 38 | if not os.path.isfile(f"{spath}/res/charicon/{char.id}.png"): # 下载头图 39 | with open(f"{spath}/res/charicon/{char.id}.png", "wb") as f: 40 | f.write(requests.get(char.image).content) 41 | 42 | _im = Image.open(f"{spath}/res/charicon/{char.id}.png") # 头图 43 | piltools.paste_image(pt, _im, 0, 0, 256, 256, with_mask=True) 44 | 45 | _im = Image.open(f"{spath}/res/img/charres/char_{char.rarity}.png") # 稀有度框 46 | piltools.paste_image(pt, _im, 0, 0, 256, 256, with_mask=True) 47 | 48 | _im = Image.open(f"{spath}/res/img/rates/{char.element}.png") # 角色属性 49 | piltools.paste_image(pt, _im, 4, 224, 28, 28, with_mask=True) 50 | 51 | draw = ImageDraw.Draw(pt) # 创建画板 52 | 53 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=24) 54 | f_w, f_h = font.getsize(f"+{char.actived_constellation_num}") 55 | pos_x = 251 - f_w 56 | draw.text(xy=(pos_x, 226), text=f"+{char.actived_constellation_num}", fill=(255, 255, 255), font=font) # 命之座 57 | 58 | 59 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=20) 60 | f_w, f_h = font.getsize(f"{char.fetter}") 61 | pos_x = 222 - f_w / 2 62 | draw.text(xy=(pos_x, 16), text=f"{char.fetter}", fill=(255, 255, 255), font=font) # 好感 63 | 64 | draw.text(xy=(14, 16), text=f"Lv.{char.level}", fill=(255, 255, 255), font=font) # 等级 65 | 66 | _size = 28 67 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=_size) 68 | f_w, f_h = font.getsize(char.name) 69 | while f_w > 160: 70 | _size -= 1 71 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=_size) 72 | f_w, f_h = font.getsize(char.name) 73 | 74 | pos_x = 128 - f_w / 2 75 | pos_y = 251 - f_h 76 | 77 | draw.text(xy=(pos_x, pos_y), text=char.name, fill=(255, 255, 255), font=font) # 角色名 78 | 79 | return pt 80 | 81 | 82 | def generate(self): 83 | """ 84 | 用户基础信息 85 | """ 86 | spath = self.spath 87 | pt = Image.new("RGBA", (1080, 1920), 0) 88 | 89 | _im = Image.open(f"{spath}/res/bg.png") 90 | piltools.paste_image(pt, _im, 0, 0, 1080, 1920, with_mask=True) # bg 91 | 92 | headimg = "icon_k.png" 93 | for _h in self.genshindata.avatars: 94 | if _h.id == 10000007: # 荧id 95 | headimg = "icon_y.png" 96 | 97 | _im = Image.open(f"{spath}/res/img/{headimg}") # 加载头像 98 | piltools.paste_image(pt, _im, 181, 107, 233, 233, with_mask=True) 99 | 100 | draw = ImageDraw.Draw(pt) # 创建画板 101 | 102 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=75) 103 | f_w, f_h = font.getsize(self.mysdata.nickname) 104 | pos_x = 297 - f_w / 2 105 | draw.text(xy=(pos_x, 365), text=self.mysdata.nickname, fill=(255, 255, 255), font=font) # 昵称 106 | 107 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=39) 108 | regiontext = f"{self.mysdata.region_name} Lv.{self.mysdata.level}" 109 | f_w, f_h = font.getsize(regiontext) 110 | pos_x = 980 - f_w 111 | draw.text(xy=(pos_x, 346), text=regiontext, fill=(255, 255, 255), font=font) # 服务器, 等级 112 | 113 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=31) 114 | uidtext = f"UID: {self.mysdata.game_role_id}" 115 | f_w, f_h = font.getsize(uidtext) 116 | pos_x = 980 - f_w 117 | draw.text(xy=(pos_x, 404), text=uidtext, fill=(255, 255, 255), font=font) # UID 118 | 119 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=37) 120 | 121 | count = 0 122 | for _myd in self.mysdata.data: # 用户4项基本信息 123 | text = f"{_myd.name}: {_myd.value}" 124 | draw.text(xy=(127, 615 + 50 * count), text=text, fill=(61, 32, 54), font=font) 125 | 126 | count += 1 127 | if count >= 4: 128 | break 129 | 130 | text = f"神瞳收集: {self.genshindata.stats.anemoculus_number}/" \ 131 | f"{self.genshindata.stats.geoculus_number}/" \ 132 | f"{self.genshindata.stats.electroculus_number}" 133 | draw.text(xy=(573, 615), text=text, fill=(61, 32, 54), font=font) # 神瞳 134 | 135 | text = f"传送点解锁: {self.genshindata.stats.way_point_number}" 136 | draw.text(xy=(573, 671), text=text, fill=(61, 32, 54), font=font) 137 | 138 | text = f"秘境解锁: {self.genshindata.stats.domain_number}" 139 | draw.text(xy=(573, 720), text=text, fill=(61, 32, 54), font=font) 140 | 141 | opened_chest = self.genshindata.stats.common_chest_number + self.genshindata.stats.exquisite_chest_number + \ 142 | self.genshindata.stats.precious_chest_number + self.genshindata.stats.luxurious_chest_number + \ 143 | self.genshindata.stats.magic_chest_number 144 | text = f"开启宝箱: {opened_chest}" 145 | draw.text(xy=(573, 773), text=text, fill=(61, 32, 54), font=font) 146 | 147 | 148 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=28) 149 | 150 | if len(self.genshindata.homes) >= 1: 151 | text = f"等级: {self.genshindata.homes[0].level}" 152 | draw.text(xy=(146, 915), text=text, fill=(61, 32, 54), font=font) 153 | 154 | text = f"解锁区域: {len(self.genshindata.homes)}" 155 | draw.text(xy=(146, 955), text=text, fill=(61, 32, 54), font=font) 156 | 157 | text = f"摆件数: {self.genshindata.homes[0].item_num}" 158 | draw.text(xy=(146, 992), text=text, fill=(61, 32, 54), font=font) 159 | 160 | text = f"访客数: {self.genshindata.homes[0].visit_num}" 161 | draw.text(xy=(146, 1032), text=text, fill=(61, 32, 54), font=font) 162 | 163 | text = f"洞天仙力: {self.genshindata.homes[0].comfort_num} ({self.genshindata.homes[0].comfort_level_name})" 164 | draw.text(xy=(146, 1071), text=text, fill=(61, 32, 54), font=font) 165 | 166 | else: 167 | text = f"等级: -" 168 | draw.text(xy=(146, 915), text=text, fill=(61, 32, 54), font=font) 169 | text = f"解锁区域: -" 170 | draw.text(xy=(146, 955), text=text, fill=(61, 32, 54), font=font) 171 | text = f"摆件数: -" 172 | draw.text(xy=(146, 992), text=text, fill=(61, 32, 54), font=font) 173 | text = f"访客数: -" 174 | draw.text(xy=(146, 1032), text=text, fill=(61, 32, 54), font=font) 175 | text = f"洞天仙力: -" 176 | draw.text(xy=(146, 1071), text=text, fill=(61, 32, 54), font=font) 177 | 178 | count = 0 179 | x_pl = [0, 1, 0, 1] 180 | y_pl = [0, 0, 1, 1] 181 | for world in self.genshindata.world_explorations: 182 | x_p = x_pl[count] 183 | y_p = y_pl[count] 184 | count += 1 185 | 186 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=33) 187 | draw.text(xy=(568 + 174 * x_p, 908 + 110 * y_p), text=world.name, fill=(61, 32, 54), font=font) 188 | 189 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=21) 190 | 191 | text = f"探索度: {'%.1f' % (world.exploration_percentage / 10)}%" 192 | draw.text(xy=(568 + 174 * x_p, 949 + 110 * y_p), text=text, fill=(61, 32, 54), font=font) 193 | text = f"等级: {world.level}" 194 | draw.text(xy=(568 + 174 * x_p, 977 + 110 * y_p), text=text, fill=(61, 32, 54), font=font) 195 | 196 | count = 0 197 | x_p = 0 198 | y_p = 0 199 | for char in self.genshindata.avatars: 200 | piltools.paste_image(pt, self.draw_character(char), 111 + 217 * x_p, 1146 + 231 * y_p, 207, 207) 201 | 202 | x_p += 1 203 | count += 1 204 | if x_p >= 4: 205 | x_p = 0 206 | y_p += 1 207 | 208 | if count >= 12: 209 | break 210 | 211 | 212 | savename = ''.join(random.sample('zyxwvutsrqponmlkjihgfedcba', 8)) + ".jpg" 213 | pt = pt.convert("RGB") 214 | pt.save(f"{spath}/temp/{savename}") 215 | return f"{spath}/temp/{savename}" 216 | 217 | 218 | def draw_floor_char_icon(self, ava: GenshinSJLXFloorInfoBattlesAvatars): 219 | spath = self.spath 220 | pt = Image.new("RGBA", (199, 245), 0) 221 | 222 | _im = Image.open(f"{spath}/res/img/charres/char_r_{ava.rarity}.png") 223 | piltools.paste_image(pt, _im, 0, 0, 199, 245, with_mask=True) # bg 224 | 225 | if not os.path.isfile(f"{spath}/res/charicon/{ava.id}.png"): # 下载头图 226 | with open(f"{spath}/res/charicon/{ava.id}.png", "wb") as f: 227 | f.write(requests.get(ava.icon).content) 228 | _im = Image.open(f"{spath}/res/charicon/{ava.id}.png") 229 | 230 | piltools.paste_image(pt, _im, 0, 11, 199, 199, with_mask=True) # 头像 231 | draw = ImageDraw.Draw(pt) # 创建画板 232 | 233 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=23) 234 | f_w, f_h = font.getsize(f"Lv.{ava.level}") 235 | pos_x = 100 - f_w / 2 236 | draw.text(xy=(pos_x, 215), text=f"Lv.{ava.level}", fill=(0, 0, 0), font=font) # 等级 237 | 238 | return pt 239 | 240 | 241 | def generate_floor(self, floor: GenshinSJLXFloors, sindex=0): 242 | bgs = ["floor9.png", "floor10.png", "floor11.png", "floor12.png"] 243 | if sindex >= len(bgs): 244 | sindex = random.randint(0, len(bgs) - 1) 245 | 246 | spath = self.spath 247 | 248 | pt = Image.new("RGBA", (1000, 622), 0) 249 | _im = Image.open(f"{spath}/res/img/floors/{bgs[sindex]}") 250 | piltools.paste_image(pt, _im, 0, 0, 1000, 622, with_mask=True) 251 | 252 | draw = ImageDraw.Draw(pt) # 创建画板 253 | 254 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=35) 255 | draw.text(xy=(81, 30), text=f"第 {floor.index} 层", fill=(255, 255, 255), font=font) # 层数 256 | 257 | star = Image.open(f"{spath}/res/img/圆角六角星.png") # 加载星星 258 | henggang = Image.open(f"{spath}/res/img/floors/henggang1.png") # 加载横杠 259 | shugang = Image.open(f"{spath}/res/img/floors/shugang1.png") # 加载竖杠 260 | 261 | piltools.paste_image(pt, henggang, 65, 82, with_mask=True) # 横竖杠一起画完 262 | piltools.paste_image(pt, henggang, 65, 256, with_mask=True) 263 | piltools.paste_image(pt, henggang, 65, 435, with_mask=True) 264 | piltools.paste_image(pt, shugang, 500, 145, with_mask=True) 265 | piltools.paste_image(pt, shugang, 500, 319, with_mask=True) 266 | piltools.paste_image(pt, shugang, 500, 498, with_mask=True) 267 | 268 | piltools.paste_image(pt, star, 795, 26, 44, 44, with_mask=True) # 星星 269 | draw.text(xy=(845, 30), text=f"{floor.star}/{floor.max_star}", fill=(255, 255, 255), font=font) # 星数 270 | 271 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=20) 272 | 273 | count = 0 274 | pos_y = 0 275 | for lv in floor.levels: # 间 276 | piltools.paste_image(pt, star, 840, 98 + 174 * pos_y, 25, 25, with_mask=True) 277 | draw.text(xy=(867, 100 + 174 * pos_y), text=f"{lv.star}/{lv.max_star}", fill=(255, 255, 255), font=font) # 获得星星 278 | 279 | timestr = "" 280 | _count = 0 281 | _pos_x = 0 282 | for b in lv.battles: # 上/下半场 283 | if timestr == "": 284 | timestr += f": {timestamp_to_text(int(b.timestamp))}" 285 | for _ava in b.avatars: # 各半场角色 286 | _im = self.draw_floor_char_icon(_ava) 287 | piltools.paste_image(pt, _im, 82 + 102 * _pos_x + 37 * _count, 138 + 174 * pos_y, 288 | 83, 103, with_mask=True) # 角色头图 289 | 290 | _pos_x += 1 291 | _count += 1 292 | 293 | 294 | draw.text(xy=(81, 101 + 174 * pos_y), text=f"第 {lv.index} 间{timestr}", fill=(255, 255, 255), font=font) # 第xx间 295 | pos_y += 1 296 | count += 1 297 | if count >= 3: 298 | break 299 | 300 | return pt 301 | 302 | 303 | 304 | def generate_sjlx(self, sjlx: GenshinShenJingLuoXuan): 305 | spath = self.spath 306 | 307 | if sjlx.total_battle_times <= 0: 308 | raise MhyQueryErrors.UserDataError("您没有战斗记录") 309 | 310 | pt = Image.new("RGBA", (1350, 4500), 0) 311 | 312 | _im = Image.open(f"{spath}/res/floor_bg.png") 313 | piltools.paste_image(pt, _im, 0, 0, 1350, 4500, with_mask=True) # bg 314 | 315 | headimg = "icon_k.png" 316 | for _h in self.genshindata.avatars: 317 | if _h.id == 10000007: # 荧id 318 | headimg = "icon_y.png" 319 | 320 | _im = Image.open(f"{spath}/res/img/{headimg}") # 加载头像 321 | piltools.paste_image(pt, _im, 216, 104, 300, 300, with_mask=True) 322 | 323 | draw = ImageDraw.Draw(pt) # 创建画板 324 | 325 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=96) 326 | f_w, f_h = font.getsize(self.mysdata.nickname) 327 | pos_x = 364 - f_w / 2 328 | draw.text(xy=(pos_x, 435), text=self.mysdata.nickname, fill=(255, 255, 255), font=font) # 昵称 329 | 330 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=50) 331 | regiontext = f"{self.mysdata.region_name} Lv.{self.mysdata.level}" 332 | f_w, f_h = font.getsize(regiontext) 333 | pos_x = 1243 - f_w 334 | draw.text(xy=(pos_x, 410), text=regiontext, fill=(255, 255, 255), font=font) # 服务器, 等级 335 | 336 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=40) 337 | uidtext = f"UID: {self.mysdata.game_role_id}" 338 | f_w, f_h = font.getsize(uidtext) 339 | pos_x = 1243 - f_w 340 | draw.text(xy=(pos_x, 485), text=uidtext, fill=(255, 255, 255), font=font) # UID 341 | 342 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=50) 343 | draw.text(xy=(140, 749), text=f"挑战次数: {sjlx.total_battle_times}", fill=(23, 21, 65), font=font) # 挑战次数 344 | draw.text(xy=(728, 749), text=f"胜利次数: {sjlx.total_win_times}", fill=(23, 21, 65), font=font) # 胜利次数 345 | 346 | flist = [sjlx.defeat_rank, sjlx.take_damage_rank, sjlx.normal_skill_rank, sjlx.energy_skill_rank] 347 | count = 0 348 | p_x = 0 349 | for _f in flist: # 基本四项 350 | if count == 1: 351 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=30) # 伤害榜字号稍小 352 | else: 353 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=38) 354 | 355 | _count = 0 # 内部计数 356 | _p_y = 0 357 | for _i in _f: 358 | if not os.path.isfile(f"{spath}/res/charicon/small/{_i.avatar_id}.png"): # 下载头图 359 | with open(f"{spath}/res/charicon/small/{_i.avatar_id}.png", "wb") as f: 360 | f.write(requests.get(_i.avatar_icon).content) 361 | _im = Image.open(f"{spath}/res/charicon/small/{_i.avatar_id}.png") 362 | piltools.paste_image(pt, _im, 124 + 288 * p_x, 881 + 58 * _p_y, 70, 70, with_mask=True) # 角色头像 363 | 364 | f_w, f_h = font.getsize(str(_i.value)) 365 | pos_x = 313 - f_w + 288 * p_x 366 | pos_y = 909 + 58 * _p_y 367 | draw.text(xy=(pos_x, pos_y), text=f"{_i.value}", fill=(23, 21, 65), font=font) # 值 368 | 369 | _count += 1 370 | _p_y += 1 371 | if _count >= 4: 372 | break 373 | 374 | p_x += 1 375 | count += 1 376 | 377 | font = ImageFont.truetype(font=f"{spath}/res/font/hanyiwenhei.ttf", size=40) 378 | draw.text(xy=(157, 1165), text=f"最深抵达: {sjlx.max_floor}", fill=(108, 19, 63), font=font) # 最深抵达 379 | 380 | if len(sjlx.damage_rank) >= 1: 381 | draw.text(xy=(701, 1165), text=f"最强一击: {sjlx.damage_rank[0].value}", fill=(108, 19, 63), font=font) 382 | f_w, f_h = font.getsize(f"最强一击: {sjlx.damage_rank[0].value}") # 最强一击 383 | 384 | if not os.path.isfile(f"{spath}/res/charicon/small/{sjlx.damage_rank[0].avatar_id}.png"): # 下载头图 385 | with open(f"{spath}/res/charicon/small/{sjlx.damage_rank[0].avatar_id}.png", "wb") as f: 386 | f.write(requests.get(sjlx.damage_rank[0].avatar_icon).content) 387 | _im = Image.open(f"{spath}/res/charicon/small/{sjlx.damage_rank[0].avatar_id}.png") 388 | piltools.paste_image(pt, _im, 701 + f_w + 29, 1134, 70, 70) # 最强一击 头图 389 | 390 | count = 0 391 | for floor in sjlx.floors: 392 | _im = self.generate_floor(floor, count) 393 | piltools.paste_image(pt, _im, 132, 1410 + 767 * count, 1081, 672, with_mask=True) 394 | 395 | count += 1 396 | 397 | savename = ''.join(random.sample('zyxwvutsrqponmlkjihgfedcba', 8)) + ".jpg" 398 | pt = pt.convert("RGB") 399 | pt.save(f"{spath}/temp/{savename}") 400 | return f"{spath}/temp/{savename}" 401 | 402 | 403 | class HonKaiGenerate: 404 | def __init__(self, mysdata: MYSdata, userinfo: HonkaiUserInfoAll, old_abyss: Optional[OldAbyss], 405 | new_abyss: Optional[NewAbyss]): 406 | self.mysdata = mysdata 407 | self.userinfo = userinfo 408 | if self.userinfo.weeklyreport.favorite_character is not None: 409 | self.userinfo.weeklyreport.favorite_character.name = self.userinfo.weeklyreport.favorite_character.name.replace("·", "•") 410 | self.old_abyss = old_abyss 411 | self.new_abyss = new_abyss 412 | self.spath = os.path.split(__file__)[0] # .py真实位置 413 | 414 | @staticmethod 415 | def mask_img(img: Image, mask_path: str, size=None) -> Image: 416 | imsize = img.size if size is None else size 417 | border = Image.open(mask_path).resize(imsize, Image.ANTIALIAS).convert('L') 418 | invert = ImageOps.invert(border) 419 | img.putalpha(invert) 420 | return img 421 | 422 | def url2pilimg(self, url: str) -> Image: 423 | spath = self.spath 424 | caname = urllib.parse.quote(url).replace("/", "%2F") 425 | 426 | if not os.path.isfile(f"{spath}/res_honkai/cache/{caname}"): 427 | req = requests.get(url) 428 | with open(f"{spath}/res_honkai/cache/{caname}", "wb") as f: 429 | f.write(req.content) 430 | 431 | return Image.open(f"{spath}/res_honkai/cache/{caname}") 432 | 433 | def draw_icon(self) -> Image: 434 | spath = self.spath 435 | pt = Image.new("RGBA", (156, 156), 0) 436 | im = Image.open(f"{spath}/res_honkai/icon_circle_i.png") # 底 437 | piltools.paste_image(pt, im, 9, 10, 137, 137, with_mask=True) 438 | 439 | im = self.url2pilimg(self.userinfo.baseinfo.role.AvatarUrl) 440 | piltools.paste_image(pt, im, 0, 13, 156, 134, with_mask=True) # 头 441 | 442 | im = Image.open(f"{spath}/res_honkai/icon_circle_o.png") # 圈 443 | piltools.paste_image(pt, im, 0, 0, 156, 156, with_mask=True) 444 | 445 | return self.mask_img(pt, f"{spath}/res_honkai/masks/black_mask.png") 446 | 447 | def draw_avatar(self, img: Image, bgurl: str, rate=-1, bgimg=None) -> Image: 448 | spath = self.spath 449 | pt = Image.new("RGBA", (156, 156), 0) 450 | im = Image.open(f"{spath}/res_honkai/circle.png") 451 | piltools.paste_image(pt, im, 0, 0, 156, 156, with_mask=True) # 背景圆圈 452 | 453 | im = self.url2pilimg(bgurl).resize((156, 156)) if bgimg is None else bgimg.resize((156, 156)) 454 | im = self.mask_img(im, f"{spath}/res_honkai/masks/black_mask.png") 455 | 456 | pt2 = Image.new("RGBA", (148, 148), 0) 457 | piltools.paste_image(pt2, im, 0, 0, 148, 148, with_mask=True) # 类型bg 458 | 459 | piltools.paste_image(pt2, img, -5, 5, 156, 137, with_mask=True) # 头像 460 | 461 | im = self.mask_img(pt2, f"{spath}/res_honkai/masks/black_mask.png", (148, 148)) 462 | piltools.paste_image(pt, im, 4, 4, 148, 148) 463 | 464 | if rate != -1 and rate != 0: 465 | ratestr = ["", "b", "a", "s", "ss", "sss"] 466 | im = Image.open(f"{spath}/res_honkai/rates/{ratestr[rate]}.png") # 稀有度 467 | piltools.paste_image(pt, im, 4, 111, 52, 40, with_mask=True) 468 | 469 | return pt 470 | 471 | 472 | def draw_battlefield(self, battle: HonKai3BattleFieldReportsBattleInfo) -> Image: 473 | spath = self.spath 474 | pt = Image.new("RGBA", (987, 215), 0) 475 | im = Image.open(f"{spath}/res_honkai/bg_battles.png") 476 | piltools.paste_image(pt, im, 0, 0, with_mask=True) 477 | 478 | areastr = ["-", "初级区", "中级区", "高级区", "终极区"] 479 | 480 | im = self.url2pilimg(battle.boss.avatar) 481 | piltools.paste_image(pt, im, 603, 32, 384, 150, with_mask=True) 482 | 483 | draw = ImageDraw.Draw(pt) # 创建画板 484 | font = ImageFont.truetype(font=f"{spath}/res_honkai/font/msyhb.ttf", size=22) 485 | ptstr = f"{areastr[self.userinfo.battlefields[0].area]} - {battle.boss.name.replace('·', '•')} " \ 486 | f"积分: {battle.score} 结算时间: {timestamp_to_text(int(self.userinfo.battlefields[0].time_second))}" 487 | draw.text(xy=(26, 21), text=ptstr, fill=(255, 255, 255), font=font) 488 | 489 | count = 0 490 | for i in battle.lineup: 491 | _im = self.url2pilimg(i.icon_path) 492 | im = self.draw_avatar(_im, i.avatar_background_path, i.star) 493 | piltools.paste_image(pt, im, 46 + 106 * count, 80, 84, 84, with_mask=True) 494 | count += 1 495 | 496 | if battle.elf is not None: 497 | _im = self.url2pilimg(battle.elf.avatar) 498 | im = self.draw_avatar(_im, "", bgimg=Image.open(f"{spath}/res_honkai/icon_circle_i.png")) 499 | piltools.paste_image(pt, im, 364, 80, 84, 84, with_mask=True) 500 | 501 | return pt 502 | 503 | def draw_abyss(self) -> Image: 504 | spath = self.spath 505 | pt = Image.new("RGBA", (987, 215), 0) 506 | im = Image.open(f"{spath}/res_honkai/bg_battles.png") 507 | piltools.paste_image(pt, im, 0, 0, with_mask=True) 508 | 509 | areastr = ["-", "初级区", "中级区", "高级区", "终极区"] 510 | typestr = {"Quantum": "量子奇点", "OW": "迪拉克之海"} 511 | draw = ImageDraw.Draw(pt) # 创建画板 512 | 513 | if self.userinfo.baseinfo.role.level <= 80: # 旧深渊 514 | levelstr = {"A": "红莲", "B": "苦痛", "C": "原罪", "D": "禁忌"} 515 | 516 | count = 0 517 | max_time = 0 518 | battle = None 519 | for _battle in self.old_abyss.reports: 520 | if int(_battle.time_second) > max_time: 521 | max_time = int(_battle.time_second) 522 | battle = _battle 523 | 524 | if battle is not None: 525 | im = self.url2pilimg(battle.boss.avatar) 526 | piltools.paste_image(pt, im, 603, 32, 384, 150, with_mask=True) # boss图片 527 | 528 | font = ImageFont.truetype(font=f"{spath}/res_honkai/font/msyhb.ttf", size=22) 529 | ptstr = f"{areastr[battle.area]} - {levelstr[battle.level]} - {typestr[battle.type]} " \ 530 | f"{battle.boss.name.replace('·', '•')} 得分: {battle.score} " \ 531 | f"结算时间: {timestamp_to_text(int(battle.time_second))}" 532 | draw.text(xy=(26, 21), text=ptstr, fill=(255, 255, 255), font=font) # 标题 533 | 534 | for i in battle.lineup: 535 | _im = self.url2pilimg(i.icon_path) 536 | im = self.draw_avatar(_im, i.avatar_background_path, i.star) 537 | piltools.paste_image(pt, im, 46 + 106 * count, 80, 84, 84, with_mask=True) 538 | count += 1 539 | 540 | if battle.elf is not None: 541 | _im = self.url2pilimg(battle.elf.avatar) 542 | im = self.draw_avatar(_im, "", bgimg=Image.open(f"{spath}/res_honkai/icon_circle_i.png")) 543 | piltools.paste_image(pt, im, 364, 80, 84, 84, with_mask=True) 544 | 545 | 546 | else: # 新深渊 547 | levelstr = ["-", "禁忌", "原罪1", "原罪2", "原罪3", "苦痛1", "苦痛2", "苦痛3", "红莲", "寂灭"] 548 | count = 0 549 | max_time = 0 550 | battle = None 551 | for _battle in self.new_abyss.reports: 552 | if int(_battle.updated_time_second) > max_time: 553 | max_time = int(_battle.updated_time_second) 554 | battle = _battle 555 | 556 | if battle is not None: 557 | im = self.url2pilimg(battle.boss.avatar) 558 | piltools.paste_image(pt, im, 603, 32, 384, 150, with_mask=True) # boss图片 559 | 560 | font = ImageFont.truetype(font=f"{spath}/res_honkai/font/msyhb.ttf", size=22) 561 | ptstr = f"终极区 - {levelstr[battle.level]} " \ 562 | f"{battle.boss.name.replace('·', '•')} 得分: {battle.score} " \ 563 | f"结算时间: {timestamp_to_text(int(battle.updated_time_second))}" 564 | draw.text(xy=(26, 21), text=ptstr, fill=(255, 255, 255), font=font) # 标题 565 | 566 | draw.text(xy=(487, 78), text=f"段位: {levelstr[battle.settled_level]}", fill=(255, 255, 255), font=font) 567 | draw.text(xy=(487, 111), text=f"排名: {battle.rank}", fill=(255, 255, 255), font=font) 568 | draw.text(xy=(487, 144), text=f"杯数: {battle.cup_number}({'+' if battle.settled_cup_number > 0 else ''}" 569 | f"{battle.settled_cup_number})", 570 | fill=(255, 255, 255), font=font) 571 | 572 | for i in battle.lineup: 573 | _im = self.url2pilimg(i.icon_path) 574 | im = self.draw_avatar(_im, i.avatar_background_path, i.star) 575 | piltools.paste_image(pt, im, 46 + 106 * count, 80, 84, 84, with_mask=True) 576 | count += 1 577 | 578 | if battle.elf is not None: 579 | _im = self.url2pilimg(battle.elf.avatar) 580 | im = self.draw_avatar(_im, "", bgimg=Image.open(f"{spath}/res_honkai/icon_circle_i.png")) 581 | piltools.paste_image(pt, im, 364, 80, 84, 84, with_mask=True) 582 | 583 | 584 | return pt 585 | 586 | def generate(self): 587 | spath = self.spath 588 | pt = Image.new("RGBA", (1350, 2700), 0) 589 | 590 | im = Image.open(f"{spath}/res_honkai/bg.png") # bg 591 | piltools.paste_image(pt, im, 0, 0, 1350, 2700, with_mask=True) 592 | 593 | im = self.draw_icon() 594 | piltools.paste_image(pt, im, 238, 138, 260, 260) # 头像 595 | 596 | draw = ImageDraw.Draw(pt) # 创建画板 597 | 598 | font = ImageFont.truetype(font=f"{spath}/res_honkai/font/msyhb.ttf", size=65) 599 | f_w, f_h = font.getsize(self.mysdata.nickname) 600 | pos_x = 366 - f_w / 2 601 | draw.text(xy=(pos_x, 426), text=self.mysdata.nickname, fill=(255, 255, 255), font=font) # 昵称 602 | 603 | font = ImageFont.truetype(font=f"{spath}/res_honkai/font/msyhb.ttf", size=47) 604 | regiontext = f"{self.mysdata.region_name} Lv.{self.mysdata.level}" 605 | f_w, f_h = font.getsize(regiontext) 606 | pos_x = 1191 - f_w 607 | draw.text(xy=(pos_x, 407), text=regiontext, fill=(255, 255, 255), font=font) # 服务器 608 | 609 | font = ImageFont.truetype(font=f"{spath}/res_honkai/font/msyhb.ttf", size=37) 610 | f_w, f_h = font.getsize(f"UID: {self.mysdata.game_role_id}") 611 | pos_x = 1191 - f_w 612 | draw.text(xy=(pos_x, 470), text=f"UID: {self.mysdata.game_role_id}", fill=(255, 255, 255), font=font) # uid 613 | 614 | count = 0 615 | font = ImageFont.truetype(font=f"{spath}/res_honkai/font/msyhb.ttf", size=41) 616 | for i in self.mysdata.data: 617 | draw.text(xy=(196, 708 + 58 * count), text=f"{i.name}: {i.value}", fill=(37, 18, 38), font=font) 618 | count += 1 619 | 620 | draw.text(xy=(725, 708), text=f"SSS装甲数: {self.userinfo.baseinfo.stats.sss_armor_number}", fill=(37, 18, 38), 621 | font=font) 622 | draw.text(xy=(725, 708 + 58), text=f"武器数: {self.userinfo.baseinfo.stats.weapon_number}", fill=(37, 18, 38), 623 | font=font) 624 | draw.text(xy=(725, 708 + 58 * 2), text=f"往世乐土: {self.userinfo.baseinfo.stats.god_war_max_challenge_level}层" 625 | f"{self.userinfo.baseinfo.stats.god_war_max_challenge_score}分", 626 | fill=(37, 18, 38), font=font) 627 | 628 | draw.text(xy=(196, 1102), text=f"金币收入: {self.userinfo.weeklyreport.gold_income}", fill=(37, 18, 38), font=font) 629 | draw.text(xy=(196, 1102 + 58), text=f"金币支出: {self.userinfo.weeklyreport.gold_expenditure}", fill=(37, 18, 38), 630 | font=font) 631 | draw.text(xy=(196, 1102 + 58 * 2), text=f"在线时长: {self.userinfo.weeklyreport.online_hours}h", fill=(37, 18, 38), 632 | font=font) 633 | 634 | draw.text(xy=(725, 1102), text=f"登录天数: {self.userinfo.weeklyreport.active_day_number}", fill=(37, 18, 38), 635 | font=font) 636 | draw.text(xy=(725, 1102 + 58), text=f"消耗体力: {self.userinfo.weeklyreport.expended_physical_power}", 637 | fill=(37, 18, 38), font=font) 638 | favorite_char = self.userinfo.weeklyreport.favorite_character.name if \ 639 | self.userinfo.weeklyreport.favorite_character is not None else '-' 640 | draw.text(xy=(725, 1102 + 58 * 2), text=f"上周劳模: {favorite_char}", 641 | fill=(37, 18, 38), font=font) 642 | 643 | count = 0 644 | _max_time = 0 645 | battle = None 646 | for _battle in self.userinfo.battlefields: # 战场 647 | if int(_battle.time_second) > _max_time: 648 | _max_time = int(_battle.time_second) 649 | battle = _battle 650 | 651 | if battle is not None: 652 | for i in battle.battle_infos: 653 | im = self.draw_battlefield(i) 654 | piltools.paste_image(pt, im, 181, 1449 + 251 * count, 987, 215, with_mask=True) 655 | count += 1 656 | 657 | 658 | im = self.draw_abyss() # 深渊 659 | piltools.paste_image(pt, im, 181, 2360) 660 | 661 | savename = ''.join(random.sample('zyxwvutsrqponmlkjihgfedcba', 8)) + ".jpg" 662 | pt = pt.convert("RGB") 663 | pt.save(f"{spath}/temp/{savename}") 664 | return f"{spath}/temp/{savename}" 665 | -------------------------------------------------------------------------------- /Genshin_query/piltools.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | def paste_image(pt, im, x, y, w=-1, h=-1, with_mask=True): 4 | """ 5 | 6 | :param pt: 原图片 7 | :param im: 要粘贴的图片 8 | :param x: x 9 | :param y: y 10 | :param w: 宽 11 | :param h: 高 12 | :param with_mask: mask 13 | """ 14 | 15 | w = im.width if w == -1 else w 16 | h = im.height if h == -1 else h 17 | im = im.resize((w, h)) 18 | 19 | pt.paste(im, (x, y, x + w, y + h), im.convert("RGBA") if with_mask else None) 20 | -------------------------------------------------------------------------------- /Genshin_query/res/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/bg.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000003.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000016.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000022.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000022.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000023.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000023.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000024.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000025.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000025.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000030.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000030.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000031.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000031.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000032.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000032.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000033.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000033.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000037.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000037.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000038.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000038.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000039.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000039.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000041.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000041.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000047.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000047.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/10000052.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/10000052.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/small/10000016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/small/10000016.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/small/10000023.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/small/10000023.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/small/10000025.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/small/10000025.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/small/10000032.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/small/10000032.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/small/10000033.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/small/10000033.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/small/10000047.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/small/10000047.png -------------------------------------------------------------------------------- /Genshin_query/res/charicon/small/10000052.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/charicon/small/10000052.png -------------------------------------------------------------------------------- /Genshin_query/res/floor_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/floor_bg.png -------------------------------------------------------------------------------- /Genshin_query/res/font/hanyiwenhei.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/font/hanyiwenhei.ttf -------------------------------------------------------------------------------- /Genshin_query/res/img/UI_HomeworldModule_1_Pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/UI_HomeworldModule_1_Pic.png -------------------------------------------------------------------------------- /Genshin_query/res/img/UI_HomeworldModule_2_Pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/UI_HomeworldModule_2_Pic.png -------------------------------------------------------------------------------- /Genshin_query/res/img/UI_HomeworldModule_3_Pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/UI_HomeworldModule_3_Pic.png -------------------------------------------------------------------------------- /Genshin_query/res/img/UI_HomeworldModule_4_Pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/UI_HomeworldModule_4_Pic.png -------------------------------------------------------------------------------- /Genshin_query/res/img/baoxiang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/baoxiang.png -------------------------------------------------------------------------------- /Genshin_query/res/img/charres/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/charres/4.png -------------------------------------------------------------------------------- /Genshin_query/res/img/charres/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/charres/5.png -------------------------------------------------------------------------------- /Genshin_query/res/img/charres/char_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/charres/char_4.png -------------------------------------------------------------------------------- /Genshin_query/res/img/charres/char_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/charres/char_5.png -------------------------------------------------------------------------------- /Genshin_query/res/img/charres/char_r_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/charres/char_r_4.png -------------------------------------------------------------------------------- /Genshin_query/res/img/charres/char_r_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/charres/char_r_5.png -------------------------------------------------------------------------------- /Genshin_query/res/img/chuansongdian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/chuansongdian.png -------------------------------------------------------------------------------- /Genshin_query/res/img/floor10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/floor10.png -------------------------------------------------------------------------------- /Genshin_query/res/img/floor11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/floor11.png -------------------------------------------------------------------------------- /Genshin_query/res/img/floor12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/floor12.png -------------------------------------------------------------------------------- /Genshin_query/res/img/floor9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/floor9.png -------------------------------------------------------------------------------- /Genshin_query/res/img/floors/floor10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/floors/floor10.png -------------------------------------------------------------------------------- /Genshin_query/res/img/floors/floor11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/floors/floor11.png -------------------------------------------------------------------------------- /Genshin_query/res/img/floors/floor12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/floors/floor12.png -------------------------------------------------------------------------------- /Genshin_query/res/img/floors/floor9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/floors/floor9.png -------------------------------------------------------------------------------- /Genshin_query/res/img/floors/henggang1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/floors/henggang1.png -------------------------------------------------------------------------------- /Genshin_query/res/img/floors/shugang1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/floors/shugang1.png -------------------------------------------------------------------------------- /Genshin_query/res/img/gu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/gu.png -------------------------------------------------------------------------------- /Genshin_query/res/img/icon_k.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/icon_k.png -------------------------------------------------------------------------------- /Genshin_query/res/img/icon_y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/icon_y.png -------------------------------------------------------------------------------- /Genshin_query/res/img/mijing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/mijing.png -------------------------------------------------------------------------------- /Genshin_query/res/img/rates/1_star_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/rates/1_star_bg.png -------------------------------------------------------------------------------- /Genshin_query/res/img/rates/2_star_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/rates/2_star_bg.png -------------------------------------------------------------------------------- /Genshin_query/res/img/rates/3_star_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/rates/3_star_bg.png -------------------------------------------------------------------------------- /Genshin_query/res/img/rates/4_star_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/rates/4_star_bg.png -------------------------------------------------------------------------------- /Genshin_query/res/img/rates/5_star_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/rates/5_star_bg.png -------------------------------------------------------------------------------- /Genshin_query/res/img/rates/anemo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/rates/anemo.png -------------------------------------------------------------------------------- /Genshin_query/res/img/rates/cryo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/rates/cryo.png -------------------------------------------------------------------------------- /Genshin_query/res/img/rates/dendro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/rates/dendro.png -------------------------------------------------------------------------------- /Genshin_query/res/img/rates/electro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/rates/electro.png -------------------------------------------------------------------------------- /Genshin_query/res/img/rates/geo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/rates/geo.png -------------------------------------------------------------------------------- /Genshin_query/res/img/rates/hydro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/rates/hydro.png -------------------------------------------------------------------------------- /Genshin_query/res/img/rates/pyro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/rates/pyro.png -------------------------------------------------------------------------------- /Genshin_query/res/img/shentong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/shentong.png -------------------------------------------------------------------------------- /Genshin_query/res/img/sjlxbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/sjlxbg.jpg -------------------------------------------------------------------------------- /Genshin_query/res/img/圆角六角星.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res/img/圆角六角星.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/abyss_report_card_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/abyss_report_card_bg.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/bg.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/bg_battles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/bg_battles.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60103.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60103.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60105.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60105.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60205.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60205.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60311.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60311.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60313.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60313.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60504.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60504.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60611.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60611.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60612.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60612.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60705.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F60705.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F62101.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F62101.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F62301.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F62301.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F62401.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2F62401.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrJiXieSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrJiXieSmall.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrLiangZiSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrLiangZiSmall.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrShengWuSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrShengWuSmall.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrXuShuSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrXuShuSmall.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrYiNengSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarCardIcons%2FAttrYiNengSmall.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarIcon%2F2301.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarIcon%2F2301.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarIcon%2F302_04_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FAvatarIcon%2F302_04_01.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FElfCardIcons%2FElf_10001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FElfCardIcons%2FElf_10001.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FElfCardIcons%2FElf_10002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FElfCardIcons%2FElf_10002.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FElfCardIcons%2FElf_10012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FElfCardIcons%2FElf_10012.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FBOSS_150_M01_SSS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FBOSS_150_M01_SSS.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FBOSS_160.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FBOSS_160.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FBOSS_180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FBOSS_180.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FBOSS_210_P3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FBOSS_210_P3.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FDG_063.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/cache/https%3A%2F%2Fupload-bbs.mihoyo.com%2Fgame_record%2Fhonkai3rd%2Fall%2FSpriteOutput%2FOpenWorld%2FQuestBossIcon%2FDG_063.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/circle.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/font/msyhb.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/font/msyhb.ttf -------------------------------------------------------------------------------- /Genshin_query/res_honkai/icon_circle_i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/icon_circle_i.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/icon_circle_o.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/icon_circle_o.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/masks/black_mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/masks/black_mask.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/masks/white_mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/masks/white_mask.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/rates/a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/rates/a.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/rates/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/rates/b.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/rates/s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/rates/s.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/rates/ss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/rates/ss.png -------------------------------------------------------------------------------- /Genshin_query/res_honkai/rates/sss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/res_honkai/rates/sss.png -------------------------------------------------------------------------------- /Genshin_query/structs.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | from typing import List, Optional 3 | from .YuanShen_User_Info.cookie_set import MoHoYoCookie 4 | 5 | 6 | class MhyQueryErrors: 7 | class MiYouSheError(Exception): 8 | def __init__(self, info="BaseError"): 9 | self.info = info 10 | 11 | def __str__(self): 12 | print(f"Error: {self.info}") 13 | return f"Error: {self.info}" 14 | 15 | class UserDataError(Exception): 16 | def __init__(self, info="BaseError"): 17 | self.info = info 18 | 19 | def __str__(self): 20 | print(f"Error: {self.info}") 21 | return f"Error: {self.info}" 22 | 23 | class CookieLimit(Exception): 24 | def __init__(self, cookie: str): 25 | MoHoYoCookie().check_limit(cookie=cookie, to_limit=True) 26 | 27 | def __str__(self): 28 | return "CookieLimitError: 当前服务忙, 请稍后再试" 29 | 30 | class CookieOutDateError(Exception): 31 | def __init__(self, cookie: str): 32 | MoHoYoCookie().check_limit(cookie=cookie, remove=True) 33 | 34 | def __str__(self): 35 | return "CookieOutDateError: 当前服务忙, 请稍后再试" 36 | 37 | class MYSCardData(BaseModel): 38 | name: str 39 | type: int 40 | value: str 41 | 42 | class MYSdata(BaseModel): # 米游社信息 43 | has_role: bool # 是否有角色 44 | game_id: int # 1-崩坏三 2-原神 45 | game_role_id: int # 游戏UID 46 | nickname: str # 游戏昵称 47 | region: str # 服务器id 48 | region_name: str # 服务器名称 49 | level: int 50 | background_image: str # 背景图URL 51 | is_public: bool # 是否公开 52 | data: List[MYSCardData] 53 | url: str # 不知道是啥 54 | data_switches: List 55 | h5_data_switches: List 56 | 57 | 58 | class GenshinUserCharacher(BaseModel): 59 | id: int 60 | image: str # 角色头图url 61 | name: str # 角色名 62 | element: str # 属性 63 | fetter: int # 好感等级 64 | level: int 65 | rarity: int # 稀有度 66 | actived_constellation_num: int # 命之座 67 | 68 | class GenshinUserStats(BaseModel): 69 | active_day_number: int # 活跃天数 70 | achievement_number: int # 成就数 71 | win_rate: int 72 | anemoculus_number: int # 风神瞳数量 73 | geoculus_number: int # 岩神瞳数 74 | electroculus_number: int # 雷神瞳数量 75 | avatar_number: int # 角色数量 76 | way_point_number: int # 传送点解锁数 77 | domain_number: int # 秘境解锁数 78 | spiral_abyss: str # 深渊进度 79 | common_chest_number: int # 普通宝箱数量 80 | exquisite_chest_number: int # 精致宝箱数量 81 | precious_chest_number: int # 珍贵宝箱数量 82 | luxurious_chest_number: int # 华丽宝箱数量 83 | magic_chest_number: int # 奇馈宝箱数量 84 | 85 | class GenshinWorldOfferings(BaseModel): 86 | name: str 87 | level: int 88 | 89 | class GenshinWorldInfo(BaseModel): 90 | level: int # 声望等级 91 | exploration_percentage: int # 探索度(需要除以10) 92 | icon: str # 区域图标url 93 | name: str 94 | type: str 95 | id: int 96 | offerings: List[GenshinWorldOfferings] # 供奉信息 97 | 98 | class GenshinHomeInfo(BaseModel): 99 | level: int # 信任等级 100 | visit_num: int # 访客数 101 | comfort_num: int # 洞天仙力 102 | item_num: int # 摆件数量 103 | name: str 104 | icon: str # 背景图 105 | comfort_level_name: str # 洞天仙力对应名称 106 | comfort_level_icon: str # 等级图标 107 | 108 | class GenshinUserData(BaseModel): 109 | avatars: List[GenshinUserCharacher] # 角色列表 110 | stats: GenshinUserStats 111 | city_explorations: List # 不知道是啥玩意, 都是空的 112 | world_explorations: List[GenshinWorldInfo] # 区域探索信息 113 | homes: List[GenshinHomeInfo] # 家园信息 114 | 115 | class GenshinSJLXRankInfo(BaseModel): 116 | avatar_id: int 117 | avatar_icon: str 118 | value: int 119 | rarity: int 120 | 121 | class GenshinSJLXFloorInfoBattlesAvatars(BaseModel): 122 | id: int 123 | icon: str 124 | level: int 125 | rarity: int 126 | 127 | class GenshinSJLXFloorInfoBattles(BaseModel): 128 | index: int # 战斗场次 129 | timestamp: str # 太怪了, 一会int一会str 130 | avatars: List[GenshinSJLXFloorInfoBattlesAvatars] 131 | 132 | class GenshinSJLXFloorInfo(BaseModel): 133 | index: int # 间号 134 | star: int 135 | max_star: int 136 | battles: List[GenshinSJLXFloorInfoBattles] 137 | 138 | class GenshinSJLXFloors(BaseModel): 139 | index: int # 层数 140 | icon: str # 空的 141 | is_unlock: bool 142 | settle_time: str 143 | star: int 144 | max_star: int 145 | levels: List[GenshinSJLXFloorInfo] 146 | 147 | class GenshinShenJingLuoXuan(BaseModel): 148 | schedule_id: int 149 | start_time: int # 10位 150 | end_time: int # 10位 151 | total_battle_times: int 152 | total_win_times: int 153 | max_floor: str 154 | reveal_rank: List[GenshinSJLXRankInfo] # 出战次数Rank 155 | defeat_rank: List[GenshinSJLXRankInfo] # 击破数Rank 156 | damage_rank: List[GenshinSJLXRankInfo] # 最强一击 157 | take_damage_rank: List[GenshinSJLXRankInfo] # 承伤Rank 158 | normal_skill_rank: List[GenshinSJLXRankInfo] # 元素战技释放数 159 | energy_skill_rank: List[GenshinSJLXRankInfo] # 元素爆发次数 160 | floors: List[GenshinSJLXFloors] 161 | total_star: int 162 | is_unlock: bool 163 | 164 | 165 | class HonKai3UserRole(BaseModel): 166 | AvatarUrl: str # 头像url 167 | nickname: str 168 | region: str # 服务器id 169 | level: int 170 | 171 | class HonKai3UserStatsOldAbyss(BaseModel): 172 | level_of_quantum: str 173 | level_of_ow: str 174 | 175 | class HonKai3UserStatsNewAbyss(BaseModel): 176 | level: int # 深渊等级(目前知道 红莲: 8 177 | cup_number: int # 杯数 178 | 179 | class HonKai3UserStats(BaseModel): 180 | active_day_number: int # 累计登舰 181 | suit_number: int # 服装数 182 | achievement_number: int 183 | stigmata_number: int # 持有圣痕数 184 | armor_number: int # 装甲数 185 | sss_armor_number: int # sss装甲数 186 | battle_field_ranking_percentage: str # 记忆战场排名(%) 187 | old_abyss: Optional[HonKai3UserStatsOldAbyss] # 旧深渊(81级以下, 二者只有一个) 188 | new_abyss: Optional[HonKai3UserStatsNewAbyss] # 新深渊(80级以上, 二者只有一个) 189 | weapon_number: int 190 | god_war_max_punish_level: int # 最高挑战难度 191 | god_war_extra_item_number: int # 追忆之证数 192 | god_war_max_challenge_score: int # 往世乐土分数 193 | god_war_max_challenge_level: int # 往世乐土层数 194 | 195 | class HonKai3UserPreference(BaseModel): # 舰长偏好 196 | abyss: int # 深渊 197 | main_line: int # 主线 198 | battle_field: int 199 | open_world: int # 开放世界 200 | community: int # 社交 201 | comprehensive_score: int # 综合评分 202 | comprehensive_rating: str # 综合评级 203 | god_war: int 204 | is_god_war_unlock: bool 205 | 206 | class HonKai3UserInfo(BaseModel): 207 | role: HonKai3UserRole 208 | stats: HonKai3UserStats 209 | preference: HonKai3UserPreference 210 | 211 | 212 | class HonKai3ReportsBattleElf(BaseModel): 213 | id: str # 又变成str了 214 | name: str 215 | avatar: str 216 | rarity: int 217 | star: int 218 | 219 | class HonKai3ReportsBattleLineup(BaseModel): 220 | id: str 221 | name: str 222 | star: int 223 | avatar_background_path: str # 稀有度背景url 224 | icon_path: str # 头像url 225 | background_path: str # 角色摆个pos的背景 226 | large_background_path: str # 角色摆个pos的背景, 比上面那个大些( 227 | figure_path: str 228 | 229 | class HonKai3ReportsBattleBoss(BaseModel): 230 | id: str 231 | name: str 232 | avatar: str 233 | 234 | class HonKai3BattleFieldReportsBattleInfo(BaseModel): 235 | elf: Optional[HonKai3ReportsBattleElf] # 武装人偶 236 | lineup: List[HonKai3ReportsBattleLineup] 237 | boss: HonKai3ReportsBattleBoss 238 | score: int 239 | 240 | class HonKai3BattleFieldReports(BaseModel): 241 | score: int 242 | rank: int # x档 243 | ranking_percentage: str 244 | area: int # -, 初级, 中级, 高级, 终极 245 | battle_infos: List[HonKai3BattleFieldReportsBattleInfo] 246 | time_second: str # 捏妈, str 247 | 248 | class HonKai3BattleFieldInfo(BaseModel): # 战场 249 | reports: Optional[List[HonKai3BattleFieldReports]] 250 | 251 | 252 | class OldAbyssReport(BaseModel): 253 | score: int 254 | time_second: str 255 | area: int 256 | lineup: List[HonKai3ReportsBattleLineup] 257 | boss: HonKai3ReportsBattleBoss 258 | level: str # {"A": "红莲", "B": "苦痛", "C": "原罪", "D": "禁忌"} 259 | reward_type: str # Relegation - 保级(不太对劲) 260 | elf: Optional[HonKai3ReportsBattleElf] 261 | type: str # {"Quantum": "量子奇点", "OW": "迪拉克之海"} 262 | 263 | class OldAbyss(BaseModel): # 旧深渊 264 | reports: List[OldAbyssReport] 265 | 266 | 267 | class NewAbyssReport(BaseModel): 268 | score: int 269 | updated_time_second: str # 上传时间 270 | boss: HonKai3ReportsBattleBoss 271 | lineup: List[HonKai3ReportsBattleLineup] 272 | rank: int # 排名 273 | settled_cup_number: int # 杯数变化 274 | cup_number: int # 杯数 275 | elf: Optional[HonKai3ReportsBattleElf] 276 | level: int # ["-", "禁忌", "原罪1", "原罪2", "原罪3", "苦痛1", "苦痛2", "苦痛3", "红莲", "寂灭"] 277 | settled_level: int # 段位, 同上 278 | 279 | class NewAbyss(BaseModel): # 新深渊 280 | reports: List[NewAbyssReport] 281 | 282 | 283 | class HonKaiWeeklyReport(BaseModel): # 周报 284 | favorite_character: Optional[HonKai3ReportsBattleLineup] 285 | gold_income: int # 金币收入 286 | gold_expenditure: int # 金币支出 287 | active_day_number: int # 签到天数 288 | online_hours: int # 在线时长 289 | expended_physical_power: int # 体力消耗 290 | main_line_expended_physical_power_percentage: int # 主线占比 291 | time_from: int 292 | time_to: int 293 | 294 | 295 | class HonkaiUserInfoAll: 296 | def __init__(self, baseinfo: HonKai3UserInfo, battlefield: HonKai3BattleFieldInfo, 297 | weeklyreport: HonKaiWeeklyReport): 298 | self.baseinfo = baseinfo 299 | self.battlefields = battlefield.reports 300 | self.weeklyreport = weeklyreport 301 | -------------------------------------------------------------------------------- /Genshin_query/temp/temp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/Genshin_query/temp/temp -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Womsxd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chieri Bot miHoYo模块 2 | 3 | - 数据获取部分由[YuanShen_User_Info](https://github.com/Womsxd/YuanShen_User_Info)修改而来 4 | - 此模块已实装至[Chieri Bot](https://space.bilibili.com/697847106) 5 | 6 | 7 | 8 | # 调用方法 9 | 10 | #### 准备阶段 11 | 12 | - 将米游社`cookie` (cookie获取方法请参考:[YuanShen_User_Info](https://github.com/Womsxd/YuanShen_User_Info)) 添加至`Genshin_query/YuanShen_User_Info/mys_cookies.db`内, 可以添加多个, 以便触发30次的限制后切换cookie 13 | 14 | #### 调用 15 | 16 | - 参考`run.py` 17 | 18 | ```python 19 | import Genshin_query 20 | 21 | # 原神个人信息 22 | Genshin_query.functions.generate_genshin_baseinfo("米游社id") 23 | 24 | # 原神深境螺旋 25 | Genshin_query.functions.generate_genshin_sjlxinfo("米游社id") 26 | 27 | # 崩坏三个人信息 28 | Genshin_query.functions.generate_honkai_userinfo("米游社id") 29 | 30 | # 以上函数返回值均为图片生成后的绝对位置 31 | ``` 32 | 33 | 34 | 35 | # 效果预览 36 | 37 | - 原神个人信息 38 | 39 | ![](https://github.com/chinosk114514/ChieriBot-miHoYo_Query/blob/master/example_ys_info.jpg?raw=true) 40 | 41 | - 原神深渊信息 42 | 43 | ![](https://github.com/chinosk114514/ChieriBot-miHoYo_Query/blob/master/example_ys_abyss.jpg?raw=true) 44 | 45 | - 崩坏三信息 46 | 47 | ![](https://github.com/chinosk114514/ChieriBot-miHoYo_Query/blob/master/example_bh3.jpg?raw=true) -------------------------------------------------------------------------------- /design_psd.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/design_psd.7z -------------------------------------------------------------------------------- /example_bh3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/example_bh3.jpg -------------------------------------------------------------------------------- /example_ys_abyss.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/example_ys_abyss.jpg -------------------------------------------------------------------------------- /example_ys_info.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinosk6/ChieriBot-miHoYo_Query/aad4322e104a7d104de12433a4dd223d805be16e/example_ys_info.jpg -------------------------------------------------------------------------------- /run.py: -------------------------------------------------------------------------------- 1 | import Genshin_query 2 | 3 | # 原神个人信息 4 | Genshin_query.functions.generate_genshin_baseinfo("米游社id") 5 | 6 | # 原神深境螺旋 7 | Genshin_query.functions.generate_genshin_sjlxinfo("米游社id") 8 | 9 | # 崩坏三个人信息 10 | Genshin_query.functions.generate_honkai_userinfo("米游社id") 11 | --------------------------------------------------------------------------------