-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import requests,os,time,base64,easygui | ||
#mcip=input('请输入IP:> ') | ||
mcip=easygui.enterbox(msg='请输入服务器IP\n如 mc.hypixel.net',title='NaixiMCServerPing-输入IP',default='') | ||
requestse=requests.get('https://list.fansmc.com/api/'+mcip) | ||
mcrequestse=requestse.json() | ||
strmcrequestse=str(mcrequestse) | ||
print('解析完毕') | ||
print('返回信息:'+strmcrequestse) | ||
#print('服务器logo: '+str(base64.b64decode(mcrequestse['logo']))) | ||
print('服务器IP: '+mcip) | ||
print('在线玩家数: '+str(mcrequestse['p'])+'/'+str(mcrequestse['mp'])) | ||
print('服务器motd: '+mcrequestse['motd']) | ||
print('服务器mod数量: '+mcrequestse['mod']) | ||
easygui.msgbox(msg='解析完毕\n解析数据:\n服务器IP:'+ | ||
mcip+'\n在线玩家数: '+ | ||
str(mcrequestse['p'])+ | ||
'/'+str(mcrequestse['mp'])+ | ||
'\n服务器motd: '+ | ||
mcrequestse['motd']+ | ||
'\n服务器mod数量: '+ | ||
mcrequestse['mod'], | ||
title='NaixiMcServerPing-解析结果', | ||
ok_button='关闭') | ||
os.system('pause') | ||
time.sleep(3) | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>4a263462-3009-448b-b72f-7249da02ff45</ProjectGuid> | ||
<ProjectHome>.</ProjectHome> | ||
<StartupFile>mcping.py</StartupFile> | ||
<SearchPath> | ||
</SearchPath> | ||
<WorkingDirectory>.</WorkingDirectory> | ||
<OutputPath>.</OutputPath> | ||
<Name>mcping</Name> | ||
<RootNamespace>mcping</RootNamespace> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="mcping.py" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" /> | ||
<!-- Uncomment the CoreCompile target to enable the Build command in | ||
Visual Studio and specify your pre- and post-build commands in | ||
the BeforeBuild and AfterBuild targets below. --> | ||
<!--<Target Name="CoreCompile" />--> | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
</Project> |