首页
直播
壁纸
友链
Search
1
一个超好用的图床
5,071 阅读
2
网页版朋友圈程序 – LAN (现已发布)
2,097 阅读
3
给大家分享几个实用网站
1,333 阅读
4
域名在QQ内打开提示'非官方页面'的解决方法
982 阅读
5
超简洁的个人主页引导页 全网首发
947 阅读
休闲娱乐
资源分享
编程技术
人工智能
登录
Search
标签搜索
python
苏画
个人导航
资源分享
个人主页
教程
苏画主页
Github
人脸识别
宝塔
爬虫
api
接口
苏画导航
导航
苏画个人导航
苏画个人主页
白嫖
opencv
微博
苏画
累计撰写
51
篇文章
累计收到
586
条评论
首页
栏目
休闲娱乐
资源分享
编程技术
人工智能
页面
直播
壁纸
友链
搜索到
5
篇与
接口
的结果
2021-05-15
超漂亮的响应式个人主页导航主页(原创)
自己写的一款漂亮的个人主页源码,由于许多人想要所以就开源分享给大家 ::(滑稽) 源码采用灵活的布局方式完美适应电脑/手机平台,因为是单页所以没有写后台,但是为了大家方便修改设置了api修改接口文件,免去了在源码里修改的烦恼,一样能实现轻松一键修改主页内容 ::(滑稽) -免费开源,其他的随便改,只求留个官方原创版权就行,谢谢!电脑端预览图{lamp/}手机端预览图{tabs}{tabs-pane label="图1"}{/tabs-pane}{tabs-pane label="图2"}{/tabs-pane}{tabs-pane label="图3"}{/tabs-pane}{/tabs}下载隐藏内容,请前往内页查看详情
2021年05月15日
615 阅读
78 评论
6 点赞
2021-04-19
github常用的api接口
功能api地址请求方式请求参数返回参数获取用户信息https://api.github.com/users/getpath路径: 用户名一个用户对象获取用户所有仓库https://api.github.com/users/{用户名}/reposgetpath路径: 用户名返回一个数组获取某个仓库的详细信息https://api.github.com/repos/{用户名}/{仓库名}getpath路径: 用户名 和 仓库名返回一个仓库对象获取某个仓库里根目录文件或文件夹数组https://api.github.com/repos//{用户名}/{仓库名}/contentsgetpath路径: 用户名 和 仓库名返回一个首层文件或文件夹数组获取某个仓库里子目录文件或文件夹数组https://api.github.com/repos//{用户名}/{仓库名}/contents/{文件名或文件夹名}getpath路径: 用户名 和 仓库名和文件名或文件夹名返回一个文件数组获取某文件的原始内容(Raw)1. 通过上面的文件信息中提取download_url这条链接,就能获取它的原始内容了。2. 或者直接访问:https://raw.githubusercontent.com/{用户名}/{仓库名}/{分支名}/{文件路径}getpath路径: 用户名 和 仓库名和文件l路径返回一个文件内容的字符串获取某个用户的跟随者列表https://api.github.com/users/{用户名}/followersgetpath路径: 用户名返回一个数组获取某个用户正在关注谁列表https://api.github.com/users/{用户名}}/followinggetpath路径: 用户名返回一个数组获取某个用户加入的组织列表https://api.github.com/users/{用户名}/orgsgetpath路径: 用户名返回一个数组repo中所有的commits列表https://api.github.com/repos/{用户名}/{仓库名}/commitsget--某一条commit详情https://api.github.com/repos/{用户名}/{仓库名}/commits/{某一条commit的SHA}get--issues列表https://api.github.com/repos/{用户名}/{仓库名}/issuesget--某条issue详情https://api.github.com/repos/{用户名}/{仓库名}/issues/{序号}getissues都是以1,2,3这样的序列排号的-某issue中的comments列表https://api.github.com/repos/{用户名}/{仓库名}/issues/{序号}/commentsget--某comment详情https://api.github.com/repos/{用户名}/{仓库名}/issues/comments/{评论详情的ID}get评论ID是从issues列表中获得的-
2021年04月19日
154 阅读
0 评论
0 点赞
2021-04-11
网易云音乐官方的一些接口
收藏这些API,获取网易云音乐数据超轻松简单介绍一下它们:评论http://music.163.com/api/v1/resource/comments/R_SO_4_{歌曲ID}?limit=20&offset=0这应该是最最最常见的了,毕竟80%的网易云音乐的爬虫/数据分析文章都是关于评论数据~使用技巧:limit:返回数据条数(每页获取的数量),默认为20,可以自行更改offset:偏移量(翻页),offset需要是limit的倍数type:搜索的类型举例,比如limit设置为10,则第一页,第二页分别为:http://music.163.com/api/v1/resource/comments/R_SO_4_483671599?limit=10&offset=0 http://music.163.com/api/v1/resource/comments/R_SO_4_483671599?limit=10&offset=10PS:返回的数据格式为json,需要注意的是通过此接口获取的评论数量最多2万条。歌单https://music.163.com/api/playlist/detail?id={歌单ID}网易云音乐每日推荐各种神奇歌单也是它的一大特色,我们可以利用这个api获取歌单里的所有歌曲信息。例如:https://music.163.com/api/playlist/detail?id=2557908184同时歌单api还可以应用于各种榜单上,例如:id=19723756,云音乐飙升榜id=3779629,云音乐新歌榜id=3778678,云音乐热歌榜id=2250011882,抖音排行榜具体id可以按需求自己查找。用户信息https://music.163.com/api/v1/user/detail/{用户ID}大家在获取到了评论之后,也会同时得到该条评论的用户id。那么利用他的id和这个用户信息api来获取用户的信息。汇总之后,我们就可以得到一个歌手在网易云的粉丝用户画像。歌词https://music.163.com/api/song/lyric?id={歌曲ID}&lv=1&kv=1&tv=-1歌词用来做什么呢?随便举例几个标题:《周杰伦14张专辑歌词,里面是19年的岁月》《华语歌坛30年,大家都在唱些什么?》搜索结果http://music.163.com/api/search/get/web?csrf_token=hlpretag=&hlposttag=&s={搜索内容}&type=1&offset=0&total=true&limit=20使用技巧:limit:返回数据条数(每页获取的数量),默认为20,可以自行更改offset:偏移量(翻页),offset需要是limit的倍数type:搜索的类型type=1 单曲type=10 专辑type=100 歌手type=1000 歌单type=1002 用户type=1004 MVtype=1006 歌词type=1009 主播电台最后推荐一些冷门的接口:歌手专辑http://music.163.com/api/artist/albums/{歌手ID}?id={歌手ID}&offset=0&total=true&limit=10专辑信息http://music.163.com/api/album/{专辑ID}?ext=true&id={专辑ID}&offset=0&total=true&limit=10歌曲信息http://music.163.com/api/song/detail/?id={歌曲ID}&ids=%5B{歌曲ID}%5DMVhttp://music.163.com/api/mv/detail?id={MV的ID}&type=mp4下载接口http://music.163.com/song/media/outer/url?id=歌曲ID.mp3相信大家看完此文,心里一定已经跃跃欲试了吧~
2021年04月11日
179 阅读
2 评论
0 点赞
2020-12-28
Python接口压力测试
1、单进程多线程模式# #!/usr/bin/env python # # -*- coding:utf-8 -*- import time import logging import requests import threading from concurrent import futures # download_url = 'http://192.168.188.110:8081//workspace/record_download/polls/82003533467_18b305da-e313-11e8-aa39-00163e0a6bde.mp3' # download_url = 'http://192.168.188.110:8081//workspace/record_download/polls/test.log' download_url = 'http://192.168.188.110:8081//workspace/record_download/polls/9921_057128214999_18210532807_20181113110420_00163e104dbfbb8b11e8e6f0d0990876(3).wav' workers = 1000 mutex = threading.Lock() session = requests.Session() contain = {'average_cost':0,'min_cost':0,'max_cost':0,'hit_count':0} def handle(cost): with mutex: min_cost = contain['min_cost'] max_cost = contain['max_cost'] hit_count = contain['hit_count'] average_cost = contain['average_cost'] if min_cost == 0: contain['min_cost'] = cost if min_cost > cost: contain['min_cost'] = cost if max_cost < cost: contain['max_cost'] = cost average_cost = (average_cost*hit_count + cost) / (hit_count + 1) hit_count +=1 contain['average_cost'] = average_cost contain['hit_count'] = hit_count logging.info(contain) def download_one(): while True: try: stime = time.time() request = requests.Request(method='GET', url=download_url,) prep = session.prepare_request(request) response = session.send(prep, timeout=100) etime = time.time() # print(response.content) logging.info('thread[%s] status[%s] cost[%s]',threading.current_thread().ident, response.status_code,etime-stime) handle(float(etime-stime)) except Exception as e: logging.error(e) print(e) def main(): with futures.ThreadPoolExecutor(workers) as executor: for i in range(workers): executor.submit(download_one) if __name__ == '__main__': logging.basicConfig(filename="client.log", level=logging.INFO, format="%(asctime)s [%(filename)s:%(lineno)d] %(message)s", datefmt="%m/%d/%Y %H:%M:%S [%A]") main()2、多进程多线程模式# #!/usr/bin/env python # # -*- coding:utf-8 -*- import os import time import logging import requests import threading from multiprocessing import Lock,Manager from concurrent import futures download_url = 'http://192.168.188.105:8888' workers = 250 cpu_count = 4 session = requests.Session() def handle(cost,mutex,contain): with mutex: min_cost = contain['min_cost'] max_cost = contain['max_cost'] hit_count = contain['hit_count'] average_cost = contain['average_cost'] if min_cost == 0: contain['min_cost'] = cost if min_cost > cost: contain['min_cost'] = cost if max_cost < cost: contain['max_cost'] = cost average_cost = (average_cost*hit_count + cost) / (hit_count + 1) hit_count +=1 contain['average_cost'] = average_cost contain['hit_count'] = hit_count logging.info(contain) def download_one(mutex,contain): while True: try: stime = time.time() request = requests.Request(method='GET', url=download_url,) prep = session.prepare_request(request) response = session.send(prep, timeout=50) etime = time.time() print(response.status_code) logging.info('process[%s] thread[%s] status[%s] cost[%s]',os.getpid(),threading.current_thread().ident, response.status_code,etime-stime) handle(float(etime-stime),mutex,contain) # time.sleep(1) except Exception as e: logging.error(e) print(e) def new_thread_pool(mutex,contain): with futures.ThreadPoolExecutor(workers) as executor: for i in range(workers): executor.submit(download_one,mutex,contain) def subprocess(): manager = Manager() mutex = manager.Lock() contain = manager.dict({'average_cost': 0, 'min_cost': 0, 'max_cost': 0, 'hit_count': 0}) with futures.ProcessPoolExecutor(cpu_count) as executor: for i in range(cpu_count): executor.submit(new_thread_pool,mutex,contain) if __name__ == '__main__': logging.basicConfig(filename="client.log", level=logging.INFO, format="%(asctime)s [%(filename)s:%(lineno)d] %(message)s", datefmt="%m/%d/%Y %H:%M:%S [%A]") subprocess()
2020年12月28日
194 阅读
0 评论
0 点赞
2020-04-24
给大家分享几个实用网站
第一个 (高清壁纸在线)这个网址采集的很多高清壁纸,但是好像要电脑才可以访问{abtn icon="" color="#3666fa" href="http://sh.qemao.com/tools/tol/bizhi/" radius="5px" content="点击传送"/} {lamp/}第二个 (小姐姐视频在线播放)在线观看小姐姐视频{abtn icon="" color="#3666fa" href="http://sh.qemao.com/tools/tol/xiaojiejie/" radius="5px" content="点击传送"/} {lamp/}第三个 (在线文字转语音)在线文字转语音播放{abtn icon="" color="#3666fa" href="http://sh.qemao.com/tools/tol/voice/" radius="5px" content="点击传送"/} {lamp/}第四个 (随机卡密生成)随机生成带数字/大写字母/小写字母的卡密{abtn icon="" color="#3666fa" href="http://sh.qemao.com/tools/tol/Rankmsc/" radius="5px" content="点击传送"/} 以上所有内容都是采用第三方接口,本站不储存任何文件噢
2020年04月24日
1,333 阅读
1 评论
3 点赞