刚学python 没多久, 代码处处是漏洞,也希望各位大佬理解一下

爬出来的图片...

使用的 是 https://www.tianapi.com/  接口下的 美女图片...

(需要自己注册一个账号, 得到key 这样才能调用 这个接口)

但是今天看天行 好像炸了

下面开始 撸代码l

爬图片的思路

第一  获取url

第二 分析数据信息,得到有用数据

第三 请求每次 得到的信息

第三 撸 下来

(大致就是这么几块)

下面开始 写代码,,,  假如没安装的 python 环境和编辑器的话,自己百度哦(当初弄这个的时候没想到写博客,如果不会,也可以叫我帮忙)

本次需要用到两个库文件

import   requests
import json

运行 输入 pip install requests

就ok了

 url="http://api.tianapi.com/meinv/?key=你的key&num=50"
req=requests.get(url)
print(req) #查看状态
4#num =50 (每次最多50条信息 否则的话 就只会显示10条信息 ,不要弄错了)
5

将会得到 这个  如果出现这个  表示  连接成功

6 html=req.text

7 print(“=====”+html)

打印出来下面的数据

很明显

他是一个字典类型然后里面又有列表,列表里面又包含字典

E:\python\python.exe E:/download/day1/homework5.py
<Response [200]>
正在下载中...
==========={"code":200,"msg":"success","newslist":[{"ctime":"2018-04-16 10:00","title":"◎秀展女模……[似曾相识 谢立琪等 355p]……第65辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/15\/20\/201804152010064641-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8319472-0-1.html"},{"ctime":"2018-04-16 13:00","title":"流浪的风","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/16\/12\/20180416124745291-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8320452-0-1.html"},{"ctime":"2018-04-16 13:00","title":"青春年华-180","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/16\/12\/201804161243225981-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8320450-0-1.html"},{"ctime":"2018-04-16 20:00","title":"I邻家女孩……[水暧山温 林温蒂 340p]……第1106辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/16\/19\/20180416195051451-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8321265-0-1.html"},{"ctime":"2018-04-16 22:00","title":"素敏--清爽自然","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/16\/21\/201804162101097271-5058976.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8321389-0-1.html"},{"ctime":"2018-04-17 12:00","title":"国内顶级丝袜模特系列1","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/16\/20\/201804162044176741-5058976.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8321357-0-1.html"},{"ctime":"2018-04-17 12:00","title":"青春年华-181","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/17\/08\/20180417082451741-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8321924-0-1.html"},{"ctime":"2018-04-17 16:00","title":"秋的记忆","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/17\/08\/20180417082809761-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8321927-0-1.html"},{"ctime":"2018-04-18 00:00","title":"I邻家女孩……[花朝月夕 花倾 73p]……第1107辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/17\/23\/20180417231039861-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8323786-0-1.html"},{"ctime":"2018-04-18 21:00","title":"☆成熟女人……[无欲则刚 郑倪蓉 50p]……第984辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/18\/20\/201804182032396691-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8325584-0-1.html"},{"ctime":"2018-04-18 22:00","title":"I邻家女孩……[拟于岱伦 李岱伦 152p]……第1108辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/18\/21\/20180418213612321-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8325672-0-1.html"},{"ctime":"2018-04-18 22:00","title":"☆成熟女人……[玉洁松贞 陈燕贞 218p]……第985辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/18\/20\/201804182043572831-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8325610-0-1.html"},{"ctime":"2018-04-18 23:00","title":"I邻家女孩……[月章星句 鲂怯 155p]……第1109辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/18\/22\/201804182236563791-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8325753-0-1.html"},{"ctime":"2018-04-20 00:00","title":"当鲜花灿烂时","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/18\/08\/201804180844296291-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8324129-0-1.html"},{"ctime":"2018-04-20 00:00","title":"美女66","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/19\/10\/20180419102531581-3030167.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8326403-0-1.html"},{"ctime":"2018-04-20 02:00","title":"清纯少女[原创]","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/20\/00\/201804200057463921-4657629.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8327834-0-1.html"},{"ctime":"2018-04-20 09:00","title":"蔷薇少女","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/20\/08\/20180420084025741-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8328121-0-1.html"},{"ctime":"2018-04-20 09:00","title":"青春年华-183","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/20\/08\/201804200835499611-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8328112-0-1.html"},{"ctime":"2018-04-21 00:00","title":"日本最可爱夜场DJ Mel 深夜福利系列私房照","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/20\/15\/20180420152931381-2053485.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8329154-0-1.html"},{"ctime":"2018-04-21 21:00","title":"I邻家女孩……[无序排列 罗佩恩 102p]……第1110辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/21\/20\/201804212035208281-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8330834-0-1.html"},{"ctime":"2018-04-21 21:00","title":"★制服女生……[顺序乱了 林艾欣 131p]……第225辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/21\/19\/201804211957264591-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8330807-0-1.html"},{"ctime":"2018-04-21 22:00","title":"I邻家女孩……[漂亮媳妇 庄g榕 175p]……第1111辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/21\/21\/201804212105392921-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8330847-0-1.html"},{"ctime":"2018-04-22 09:00","title":"银杏黄了","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/21\/15\/201804211511057621-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8330537-0-1.html"},{"ctime":"2018-04-22 09:00","title":"簇拥","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/21\/15\/201804211509295771-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8330535-0-1.html"},{"ctime":"2018-04-22 15:00","title":"I邻家女孩……[相思成灾 忆忆 175p]……第1112辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/22\/14\/201804221432413751-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8331393-0-1.html"},{"ctime":"2018-04-22 15:00","title":"午後光","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/22\/14\/201804221430183511-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8331390-0-1.html"},{"ctime":"2018-04-22 15:00","title":"慧心","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/22\/14\/201804221428205141-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8331389-0-1.html"},{"ctime":"2018-04-22 15:00","title":"古装魅力","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/22\/14\/201804221407161841-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8331372-0-1.html"},{"ctime":"2018-04-22 16:00","title":"☆成熟女人……[挺挺欲立 苏小立 144p]……第986辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/22\/15\/201804221521313471-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8331440-0-1.html"},{"ctime":"2018-04-22 16:00","title":"日本美女池田七帆学生制服写真","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/22\/15\/201804221535331971-2053485.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8331457-0-1.html"},{"ctime":"2018-04-22 16:00","title":"I邻家女孩……[相思成灾 忆忆 180p]……第1112辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/22\/14\/201804221432413751-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8331393-0-1.html"},{"ctime":"2018-04-22 17:00","title":"☆成熟女人……[橘子熟了 翁 153p]……第987辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/22\/15\/201804221559212591-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8331489-0-1.html"},{"ctime":"2018-04-22 19:00","title":"乐基儿近照身材壮硕肉感足[贴图]","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/22\/17\/20180422175812791-3194050.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8331608-0-1.html"},{"ctime":"2018-04-23 11:00","title":"老上海风情","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/23\/07\/20180423075206181-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8332060-0-1.html"},{"ctime":"2018-04-23 16:00","title":"I邻家女孩……[无序排列 罗佩恩 114p]……第1110辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/21\/20\/201804212035208281-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8330834-0-1.html"},{"ctime":"2018-04-24 10:00","title":"衣模","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/24\/09\/201804240919072211-3030167.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8334463-0-1.html"},{"ctime":"2018-04-24 12:00","title":"清新甜美氧气美女肌肤白嫩酥胸美腿私房写真","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/23\/18\/201804231827029341-2053485.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8333580-0-1.html"},{"ctime":"2018-04-24 12:00","title":"葵林倩影","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/24\/06\/201804240629131861-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8334223-0-1.html"},{"ctime":"2018-04-25 00:00","title":"人面桃花相映红","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/24\/06\/20180424063202231-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8334227-0-1.html"},{"ctime":"2018-04-25 10:00","title":"紫春","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/25\/09\/20180425091032981-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8336584-0-1.html"},{"ctime":"2018-04-25 10:00","title":"雾熙","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/25\/09\/20180425090828261-239867.gif","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8336578-0-1.html"},{"ctime":"2018-04-26 20:00","title":"上国料萌衣~容貌和歌声格外醒目的美少女","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/26\/18\/2018042618574951-2053485.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8339976-0-1.html"},{"ctime":"2018-04-26 21:00","title":"☆成熟女人……[妍希 151p]……第988辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/26\/20\/201804262026445371-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8340081-0-1.html"},{"ctime":"2018-04-26 22:00","title":"I邻家女孩……[百卉千葩 潘雅卉 144p]……第1113辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/26\/21\/20180426210649511-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8340141-0-1.html"},{"ctime":"2018-04-26 22:00","title":"☆成熟女人……[妍姿艳质 妍希 151p]……第988辑","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/26\/20\/201804262026445371-1559530.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8340081-0-1.html"},{"ctime":"2018-04-27 11:00","title":"孤芳自赏","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/26\/21\/201804262149345441-619336.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8340219-0-1.html"},{"ctime":"2018-04-27 12:00","title":"宁静的女孩","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/26\/22\/201804262212048191-619336.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8340243-0-1.html"},{"ctime":"2018-04-28 10:00","title":"人生若只如初见","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/28\/09\/201804280919423791-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8342677-0-1.html"},{"ctime":"2018-04-28 10:00","title":"醉春","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/28\/09\/201804280917461191-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8342672-0-1.html"},{"ctime":"2018-04-28 10:00","title":"名模风采","description":"华声美女","picUrl":"http:\/\/image.hnol.net\/c\/2018-04\/28\/09\/20180428091324361-239867.jpg","url":"http:\/\/bbs.voc.com.cn\/mm\/meinv-8342667-0-1.html"}]}
图片已经下载完了哦!!! Process finished with exit code 0

print(html)

但是 它的类型现在目前是str (C#叫做string)  我们必须要转换一下

dict1=json.loads(html)  # 格式化4    调用json 的模块 然后 调用 loads (这里不使用load)打印一下类型 发现已经变成字典类型了
接下来 我们研究一下 刚刚打印出来的数据
发现了 newlist:[{XXXXXX}]
我们一层一层解析出来
dict1_data=dict1["newslist"]
print(dict1_data)

[{'ctime': '2017-01-24 16:00', 'title': '花花', 'description': '华声美女', 'picUrl': 'http://image.hnol.net/c/2017-01/23/15/20170123152957561-1876615.jpg'。。。。。。'url': 'http://bbs.voc.com.cn/mm/meinv-7641359-0-1.html'}]

变成这样就好办了

我们自己 请求图片地址,然后每次请求都把图片写下来

但是大家注意到了没有, 解析出来的 东西 并不是仅仅是图片, 而且还有文字

{'ctime': '2017-01-24 16:00', 'title': '花花', 'description': '华声美女', 'picUrl': 'http://image.hnol.net/c/2017-01/23/15/20170123152957561-1876615.jpg'

但是我们要的只要图片 不要其他的

这里,我们又要再一次解析...

但是 你看见了  我们的图片连接 有很多啊

那我岂不是要请求很多次

这个时候 我们使用 for循环 来请求

然后下载保存

  for list_data in dict1_data:

#print(list_data["picUrl"]) 图片 仅仅是 要图片地址,不要其他东西

   reqs=requests.get(list_data["picUrl"])
print(reqs) #每次请求
f=open('./image/'+‘ssss.jpg’,"wb")
for reqs_data in reqs:
f.write(reqs_data)
f.close() #关闭

这样子,我们已经把图片下载下来了

可是我们不知道 什么时候下载完了 ,你也不可能一直盯着电脑

我们来个提示

for  list_data  in dict1_data:
#print(list_data["picUrl"]) 图片 仅仅是 要图片地址,不要其他东西
reqs=requests.get(list_data["picUrl"])
print(reqs) #每次请求
f=open('./image/'+‘ssss.jpg’,"wb")
for reqs_data in reqs:
f.write(reqs_data)
f.close() #关闭 print("图片已经下载完了哦!!!") 这样子 图片下载完毕之后 我们就知道已经完成了
但是 这里也会有个问题
如果你运行的话,只会有一张图片
因为 你一直请求,然后写入到 ssss.jpg ...
这里 你不能写死了 ,我们换一下,注意看看图片的连接名字,发现他们的地址都不一样,名字也不一样
http://sd/sd//sd/.01.jpg 类似这样...
我们能不能也这样子呢
再改一下代码
for  list_data  in dict1_data:
#print(list_data["picUrl"]) 图片 仅仅是 要图片地址,不要其他东西
reqs=requests.get(list_data["picUrl"])
print(reqs) #每次请求
strimg=list_data["picUrl"].split("/")[-1] #split 是 字符串截取  split("/") 是截图每次遇见/ 就截图  [-1] 是 获取最后 一次的以/的 数据  如  http://的/d/d/d1.jpg  得到的 是d1.jpg
f=open('./image/'+strimg,"wb")
   for reqs_data  in reqs:
f.write(reqs_data)
f.close() #关闭 print("图片已经下载完了哦!!!")
运行一下

这个错误呢 是我们 抓的太频繁了 ,,, 浏览器 拒绝了本次请求。。重新运行一下就行了(主要是这里没写反扒...)
下面我们重新运行一下

当然在这里 觉得代码太多 看着烦,可以写个函数 封装一下哦

就是这样哦  ,,,一不小心就爬了几百张图片了...   我只会爬这种哦.. 其他的什么都不会(一脸严肃)

 #coding:utf8
# 插入requests 库
import requests
import json
def Mian():
url="http://api.tianapi.com/meinv/?key=XXX&num=10"
req=requests.get(url)
print(req) #查看状态
print("正在下载中...")
html=req.text
print(html)
#print(html_doc) #结果 为 字典 列表 字典 打印 html 内容
dict1=json.loads(html) # 格式化4
#print("==========="+html)
dict1_data=dict1["newslist"]
#print(dict1_data)
for list_data in dict1_data:
#print(list_data["picUrl"]) 图片
reqs=requests.get(list_data["picUrl"])
print(reqs)
strimg=list_data["picUrl"].split("/")[-1]
f=open('./image/'+strimg,"wb")
for reqs_data in reqs:
f.write(reqs_data)
f.close()
print("图片已经下载完了哦!!!") Mian()

爬取图片demo

重要的事情说三遍!!!

觉得这篇文章好的 就点点关注哦

觉得这篇文章好的 就点点关注哦

觉得这篇文章好的 就点点关注哦

 

使用python下载图片(福利)的更多相关文章

  1. python下载图片超时的调查

    在使用python3下载图片时, 常用的方法有urlretrieve和requests两种, 不管哪种方法在网速极慢的情况下, 会出现图片下载卡住现象.那如何解决呢? 小编根据网上提供的资料测试了几种 ...

  2. Python下载图片并保存本地的两种方式

    一:使用Python中的urllib类中的urlretrieve()函数,直接从网上下载资源到本地,具体代码: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ...

  3. python下载图片(2)

    #-*- coding: UTF-8 -*- import urllib2, re,datetime,time, os,sys from PIL import Image, ImageDraw, Im ...

  4. python 下载图片的方法

    a='http://wx1.sinaimg.cn/mw600/006HOayNgy1fqjdi2nxohj32pw3o8x6s.jpg'  #图片下载地址   ( 这里改成 文件txt地址)w='/U ...

  5. Python下载图片小程序

    欢迎大侠们指正批评 思路: 1.引入相关的python文件(import re  import urllib) 2.读取对应网页的html文件(使用 urllib) def getHtml(url): ...

  6. Python 下载图片的几种方法

    import osos.makedirs('./image/', exist_ok=True)IMAGE_URL = "http://image.nationalgeographic.com ...

  7. python下载图片(3)

    # -*- coding: utf-8 -*-"""some function by metaphy,2007-04-03,copyleftversion 0.2&quo ...

  8. python下载图片

    import re import  urllib.request   def getHtml(url): page = urllib.request.urlopen(url) html = page. ...

  9. python 下载图片

    import requests from PIL import Image from io import BytesIO url = 'http://image2.buslive.cn/shp/upl ...

随机推荐

  1. 使用sproto buff 的陷阱

    当sproto协议包中的数组元素,长度为0时,会出现接收异常.在没有调试断点的情况下,会停止接收其它协议.

  2. 免Root停用“Android键盘(AOSP)”

    一.效果:隐藏手机状态栏输入法选择图标: 二.手段:使用ADB免root 停用系统默认Android键盘(AOSP),这里参考了大神的方法,在此表示感谢: 三.实现过程: 上图 下面就是按照大神的方法 ...

  3. 【ARM-Linux开发】 uboot启动阶段修改启动参数方法及分析

    作者:围补 本来启动方式这节不是什么复杂的事儿,不过想简单的说清楚明白,还真是不知道怎么组织.毕竟文字跟有声语言表达有别.但愿简单的东西别让我讲的太复杂! Arm板系统文件一般有三个--bootloa ...

  4. ffmpeg学习笔记-Linux下编译Android动态库

    Android平台要使用ffmpeg就需要编译生成动态库,这里采用Ubuntu编译Android动态库 文件准备 要编译生成Android需要以下文件 NDK ffmpeg源代码 NDK下载 NDK可 ...

  5. go语言简单介绍,增强了解

    1. Go语言没有类和继承的概念,所以它和 Java 或 C++ 看起来并不相同.但是它通过接口(interface)的概念来实现多态性.Go语言有一个清晰易懂的轻量级类型系统,在类型之间也没有层级之 ...

  6. HIVE的UDF

    HIVE的UDF    新建java工程,导入hive相关包,导入hive相关的lib.    创建类继承UDF    自己编写一个evaluate方法,返回值和参数任意.    为了能让mapred ...

  7. ztree根据ztreeId【节点id】设置展开、选中、触发点击节点事件

    有时候我们要默认选中某个节点,根据ztreeId // 这里的ztreeId就是ztree存放在页面的元素id,比如div的id // treeObj就是ztree对象 var treeObj = $ ...

  8. Nginx04---编译安装

    原文:https://www.cnblogs.com/zhang-shijie/p/5294162.html 一:基介绍 官网地址www.nginx.org,nginx是由1994年毕业于俄罗斯国立莫 ...

  9. Python解Leetcode: 725. Split Linked List in Parts

    题目描述:给定一个单链表,写一个函数把它分成k个单链表.分割成的k个单链表中,两两之间长度差不超过1,允许为空.分成的k个链表中,顺序要和原先的保持一致,比如说每个单链表有3个结点,则第一个单链表的结 ...

  10. Nginx部署前后端分离的单页应用配置

    #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #erro ...