Introduction to Python crawler * Download King glory full skin (HD Wallpaper)

SunriseCai 2020-11-13 11:32:03
introduction python crawler download king

This blog is only for my spare time to record articles , Publish to , Only for users to read , If there is any infringement , Please let me know , I'll delete it .
This article is pure and wild , There is no reference to other people's articles or plagiarism .


  • The front is too verbose , It is suggested to watch the introduction directly ( Namely code ).
  • Recent first contact with reptiles , I always think of playing drums . see , With this article .
  • I'm sure to say , You can't find another blog post about the king's glory downloading HD Wallpaper in more detail than this one .
  • Speaking of the glory of the king , I'm sure everyone will be familiar with , therefore , This article is about using Python Download all the king glory HD wallpapers .

 Insert picture description here

  • Remember a while ago , Often hear , Do you drive black ? I'm the Luna thief 6?
  • my Luna It's really good , But my Cai Wenji fights against the wild better .

 Insert picture description here

  • The chat is over , Let's get to the point .

This time, there are four small points :

  • Hang in the air ) Start the game
  • Hang in the air ) Take a blood First Blood
  • Hang in the air ) Success is supernatural Legendary
  • Hang in the air ) Destroy enemy crystal Victory

1. Start the game

  • Welcome to the glory of the king , The enemy is five seconds away
  1. First open... With a browser Official website of King glory , Click on Game wallpaper .
     Insert picture description here

  2. After entering the wallpaper interface , See the page New hero new skin Yes 4 Wallpaper , High definition wallpaper Yes 20 Wallpaper , And there are multiple pages of wallpaper , What I need to download here is High definition wallpaper . Wallpaper has 20 page , Each page is 20 A wallpaper . namely 20*20=400 Wallpaper .
     Insert picture description here
     Insert picture description here

  3. The game begins , See how to get a blood (First Blood).

2. Take a blood First Blood

  1. See the source here ,p_newhero_item This class corresponds to the High definition wallpaper . just 20 Class and 20 Wallpaper
     Insert picture description here

  2. Click on it. The sable cicada The wallpaper , Found that it has 7 Kind of Different sizes or resolutions . See the source code on the right , The corresponding size of the image links are in the source code inside . that 7 All the wallpaper in one size is 400*7=2800 Zhang .
     Insert picture description here

  3. Here I click on the link of a wallpaper , Find that the page jumps to the corresponding size of the image .
     Insert picture description here

  4. The first battle was won , Succeed in taking one blood .
     Insert picture description here

  • Now I know the link of the picture ( namely url) How to get , Let's take a look at the rules between his different pages .

3. Success is supernatural Legendary

  1. front 5 page url as follows ,url Some processing has been done , Remove some data that does not affect access .
 first page
The second page
The third page
Page four
Page 5
  1. Through the top 5 individual url We can get the law ,url The point of change is page here , The first page is 0, For every page that is incremented page be +1 .
  2. Let's see how the links are obtained . Open... On the page Developer tools . Every click on the next page , It will appear. 31 A packet . Among them is 1 Links for pages , The rest 30 These are all Wallpapers thumbnails .

 Insert picture description here

  1. It's been successful here , Because the analysis of the website has been completed . The task is done 80% 了 .

 Insert picture description here

  • Next, it's the push tower part , Just to write code .

4. Destroy the local crystal Victory

  • Here we are. , It's about to be decided .
  • After watching the ultimate strategy of sacrifice , Turn them over .

4.1 Complete strategy

The introduction may not be as detailed here , But practice gives you true knowledge . If you can't ( Yes ! Just not ), You can leave a message below or send me a private message .

Here is a king's glory Wallpaper size And Picture links Correspondence of .

  • Look at the table below to see ,url The change is .jpg The numbers in front ,
  • With the growth of wallpaper size , The corresponding number in the link is increasing +1,
  • Don't ask me how I found the law , It took me more than two hours to ask .
Wallpaper size Picture links
# -*- coding: utf-8 -*-
# @Time : 2020/1/9 18:13
# @User : Admin
# @Author : SunriseCai
# @File :
# @IDE : PyCharm
import json
import requests
from queue import Queue
from urllib import parse
class DownloadPicture(object):
def __init__(self):
self.Pageurl = '' \
'DataType=JSON&iListNum=20&totalpage=0&page={}&iOrder=0&iSortNumClose=1&jsoncallback=&iAMSActivityId=51991' \
self.headers = {

'Referer': '',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36'
self.q_ = Queue()
self.picture_url_list = []
self.size_num_contrast = ['1024x768', '1280x720', '1280x1024', '1440x900', '1920x1080', '1920x1200',
# Get links to all pages
def get_page_url(self):
for page in range(1):
def get_picture_url(self, Pageurl):
res = requests.get(url=Pageurl, headers=self.headers)
res = json.loads(res.text)
for data in res['List']:
name = parse.unquote(data['sProdName'])
for num in range(2, 9):
self.picture_url_list.append(parse.unquote(data['sProdImgNo_{}'.format(num)])[:-3] + '0')
self.q_.put([name, self.picture_url_list])
self.picture_url_list = []
def download_picture(self):
while True:
if not self.q_.empty():
url_data = self.q_.get()
name = url_data[0]
for picture_url, size in zip(url_data[1], self.size_num_contrast):
resp = requests.get(picture_url, headers=self.headers)
with open('%s_%s.jpg' % (name, size), 'wb') as f:
print(' picture :%s_%s.jpg Download successful ' % (name, size))
def main(self):
if __name__ == '__main__':
spider = DownloadPicture()
  • thus , Game clearance . Destroyed each other's Crystal .

I'm glad I didn't disgrace myself , In this strategy, we will kill all the places , Has won the game successfully .

  • Completed ) Start the game
  • Completed ) Take a blood First Blood
  • Completed ) Success is supernatural Legendary
  • Completed ) Destroy enemy crystal Victory

 Insert picture description here

  • Let's take a look at the loot after attacking the opponent's crystal . What about? , Interesting. !!

 Insert picture description here
Finally, I wish all players can rise to the legendary He who has a strong mouth , I also welcome you to drive black with me . I, Cai Wenji, fight against the bandits 6.
 Insert picture description here

5. Conclusion

This king glory HD Wallpaper download is a simple program , There is no problem in the code implementation .

What else are you doing here ?? Copy and paste the code to execute !

Okay , This sharing ends here .

If you have any questions, please leave a message below .


  1. 利用Python爬虫获取招聘网站职位信息
  2. Using Python crawler to obtain job information of recruitment website
  3. Several highly rated Python libraries arrow, jsonpath, psutil and tenacity are recommended
  4. Python装饰器
  5. Python实现LDAP认证
  6. Python decorator
  7. Implementing LDAP authentication with Python
  8. Vscode configures Python development environment!
  9. In Python, how dare you say you can't log module? ️
  10. 我收藏的有关Python的电子书和资料
  11. python 中 lambda的一些tips
  12. python中字典的一些tips
  13. python 用生成器生成斐波那契数列
  14. python脚本转pyc踩了个坑。。。
  15. My collection of e-books and materials about Python
  16. Some tips of lambda in Python
  17. Some tips of dictionary in Python
  18. Using Python generator to generate Fibonacci sequence
  19. The conversion of Python script to PyC stepped on a pit...
  20. Python游戏开发,pygame模块,Python实现扫雷小游戏
  21. Python game development, pyGame module, python implementation of minesweeping games
  22. Python实用工具,email模块,Python实现邮件远程控制自己电脑
  23. Python utility, email module, python realizes mail remote control of its own computer
  24. 毫无头绪的自学Python,你可能连门槛都摸不到!【最佳学习路线】
  25. Python读取二进制文件代码方法解析
  26. Python字典的实现原理
  27. Without a clue, you may not even touch the threshold【 Best learning route]
  28. Parsing method of Python reading binary file code
  29. Implementation principle of Python dictionary
  30. You must know the function of pandas to parse JSON data - JSON_ normalize()
  31. Python实用案例,私人定制,Python自动化生成爱豆专属2021日历
  32. Python practical case, private customization, python automatic generation of Adu exclusive 2021 calendar
  33. 《Python实例》震惊了,用Python这么简单实现了聊天系统的脏话,广告检测
  34. "Python instance" was shocked and realized the dirty words and advertisement detection of the chat system in Python
  35. Convolutional neural network processing sequence for Python deep learning
  36. Python data structure and algorithm (1) -- enum type enum
  37. 超全大厂算法岗百问百答(推荐系统/机器学习/深度学习/C++/Spark/python)
  38. 【Python进阶】你真的明白NumPy中的ndarray吗?
  39. All questions and answers for algorithm posts of super large factories (recommended system / machine learning / deep learning / C + + / spark / Python)
  40. [advanced Python] do you really understand ndarray in numpy?
  41. 【Python进阶】Python进阶专栏栏主自述:不忘初心,砥砺前行
  42. [advanced Python] Python advanced column main readme: never forget the original intention and forge ahead
  43. python垃圾回收和缓存管理
  44. java调用Python程序
  45. java调用Python程序
  46. Python常用函数有哪些?Python基础入门课程
  47. Python garbage collection and cache management
  48. Java calling Python program
  49. Java calling Python program
  50. What functions are commonly used in Python? Introduction to Python Basics
  51. Python basic knowledge
  52. Anaconda5.2 安装 Python 库(MySQLdb)的方法
  53. Python实现对脑电数据情绪分析
  54. Anaconda 5.2 method of installing Python Library (mysqldb)
  55. Python implements emotion analysis of EEG data
  56. Master some advanced usage of Python in 30 seconds, which makes others envy it
  57. python爬取百度图片并对图片做一系列处理
  58. Python crawls Baidu pictures and does a series of processing on them
  59. python链接mysql数据库
  60. Python link MySQL database