God-level programmers skillfully use Python to develop the King Glory of the sister artifact, upgrade to the King!

Source: Internet
Author: User
Tags bssid

Python (pronunciation: English [? Pa?θ?n], beauty [? Pa?θɑ:n]), is an object-oriented, literal translation of computer programming language, but also a powerful general-purpose language, has nearly 20 years of development history, mature and stable. It contains a comprehensive set of standard libraries that are easy to understand and can easily accomplish many common tasks. Its syntax is very simple and clear, unlike most other programming languages, it uses indentation to define the statement.

Python supports imperative programming, object-oriented programming, functional programming, slice-oriented programming, generic programming, and many programming paradigms. Like scheme, Ruby, Perl, Tcl and other dynamic languages, Python has garbage collection and can automatically manage storage usage. It is often used as a scripting language to handle system administration tasks and network programming, but it is also well suited to perform high-level tasks. The Python virtual machine itself can run on almost all operating systems. Using tools such as Py2exe, PyPy, Pyinstaller, you can convert Python source code into a program that can run out of the Python interpreter.

The glory of Kings--the very fire of the hand--is almost young and old--outrageous--albeit simple--but why you're still being abused is actually tricky--this article uses Python to take you through the tricks of the hero's glory, to make you a god-like presence.

Environment: python3+ Windows

IDE: Casual

Module:

From urllib.request import Urlretrieve

Import requests

Find three interfaces first

The first one is the interface of the hero weapon.

# Weapon URL Address

Weapon_url = "http://gamehelper.gm825.com/wzry/equip/list?channel_id=90009a&app_id=h9044j&game_id=7622 &game_name=%e7%8e%8b%e8%80%85%e8%8d%a3%e8%80%80&vcode=12.0.3&version_code=1203&cuid= 2654cc14d2d3894dbf5808264ae2dad7&ovr=6.0.1&device=xiaomi_mi+5&net_type=1&client_id= 1yfyt44qsqu7pcvdddubyq%3d%3d&info_ms=fbzj%2bcu4zdatl4cyhuz%2fjq%3d%3d&info_ma=xshbgigi0v1hxxtqixi% 2bkbgxtntop0%2fn1wztmwrwj5o%3d&mno=0&info_la=9achhtmc3uw%2bfy8%2bcfhcfw%3d%3d&info_ci=9achhtmc3uw% 2bfy8%2bcfhcfw%3d%3d&mcc=0&clientversion=&bssid=vy%2beiuzrj%2fwaxmollvurmodx1ztf%2f2dzswn2aoem0i4% 3d&os_level=23&os_id=dc451556fc0eeadb&resolution=1080_1920&dpi=480&client_ip=192.168.0.198 &pdunid=a83d20d8 "

The second one is the Hero list interface

# Hero List URL address

Heros_url = "http://gamehelper.gm825.com/wzry/hero/list?channel_id=90009a&app_id=h9044j&game_id=7622 &game_name=%e7%8e%8b%e8%80%85%e8%8d%a3%e8%80%80&vcode=12.0.3&version_code=1203&cuid= 2654cc14d2d3894dbf5808264ae2dad7&ovr=6.0.1&device=xiaomi_mi+5&net_type=1&client_id= 1yfyt44qsqu7pcvdddubyq%3d%3d&info_ms=fbzj%2bcu4zdatl4cyhuz%2fjq%3d%3d&info_ma=xshbgigi0v1hxxtqixi% 2bkbgxtntop0%2fn1wztmwrwj5o%3d&mno=0&info_la=9achhtmc3uw%2bfy8%2bcfhcfw%3d%3d&info_ci=9achhtmc3uw% 2bfy8%2bcfhcfw%3d%3d&mcc=0&clientversion=&bssid=vy%2beiuzrj%2fwaxmollvurmodx1ztf%2f2dzswn2aoem0i4% 3d&os_level=23&os_id=dc451556fc0eeadb&resolution=1080_1920&dpi=480&client_ip=192.168.0.198 &pdunid=a83d20d8 "

The third one is the hero's interface.

The third interface is a bit special and requires the previous hero ID, which is hero_id

# Hero Outbound URL

Hero_url = "http://gamehelper.gm825.com/wzry/hero/detail?hero_id={}&channel_id=90009a&app_id=h9044j& game_id=7622&game_name=%e7%8e%8b%e8%80%85%e8%8d%a3%e8%80%80&vcode=12.0.3&version_code=1203& Cuid=2654cc14d2d3894dbf5808264ae2dad7&ovr=6.0.1&device=xiaomi_mi+5&net_type=1&client_id= 1yfyt44qsqu7pcvdddubyq%3d%3d&info_ms=fbzj%2bcu4zdatl4cyhuz%2fjq%3d%3d&info_ma=xshbgigi0v1hxxtqixi% 2bkbgxtntop0%2fn1wztmwrwj5o%3d&mno=0&info_la=9achhtmc3uw%2bfy8%2bcfhcfw%3d%3d&info_ci=9achhtmc3uw% 2bfy8%2bcfhcfw%3d%3d&mcc=0&clientversion=&bssid=vy%2beiuzrj%2fwaxmollvurmodx1ztf%2f2dzswn2aoem0i4% 3d&os_level=23&os_id=dc451556fc0eeadb&resolution=1080_1920&dpi=480&client_ip=192.168.0.198 &pdunid=a83d20d8 ". Format (hero_id)

The following is a pleasant code trip ~

Warm up first, through urllib download King Glory Hero Pictures, the following is the Code section:

Download pictures after running:

Next is to get the hero's name and ID, the code is as follows:

Operating effect:

Next up is the main part of the outfit.

According to the Hero ID entered by the user, to find out the hero's out, and the total price

The code is as follows:

The Seek_weapon function, when called, requires Weapon_info, which is the dictionary of all weapons, and this time it is necessary to define a function to acquire a dictionary of weapons.

The result of the final operation:

In fact, can continue to extend the, can be made into an app, and then check out the installed, write a good-looking interface! The feeling is a very good app,emmmmm can be similar to the previous LOL box.

The Python learning route is divided into three main stages: basic-advanced-framework-project combat

Basic first Stage: understanding of basic python. Basic second stage face to object programming (emphasis on programming ability)

The third stage of the basic object-oriented "design idea"-encapsulation-inheritance. Basic Phase IV Python advanced topic.

The first stage of Advanced class: Linux Foundation. Second: Python Web tools. The third Python deployment tool.

The four relational database. Fifth Python web Framework Foundation principle.

Framework phase. Python Web development phase web.py. Base Second Django Foundation.

The Third Flask Foundation. The foundation of the four tornado,

Project Combat: Personal Blog System-development-Enterprise OA system = Network Disk System.

I have a public number, and I often share some of the stuff about Python technology. If you like my share, you can use the search "Python language learning" to follow

Welcome to join thousands of people to exchange questions and answers skirt: 588+090+942

God-level programmers skillfully use Python to develop the King Glory of the sister artifact, upgrade to the King!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.