分享一些壁纸api(小鸟)

分享一些壁纸api

搜索接口

import requests

url = "https://wp.shanhutech.cn/intf/GetUpOrDownWallpaper"
querystring = {"type":"search","action":"","value":"原神","id":"2051093"}
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"}
response = requests.request("POST", url, headers=headers, params=querystring)
print(response.text)

最新

import requests

url = "https://shcdn-wp.shanhutech.cn/intf/newestList"

querystring = {"pageno":"1","count":"10"}

headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"}

response = requests.request("POST", url, headers=headers, params=querystring)

print(response.text)

类别

参数说明,可以导入apipost中

[
	{
		"description": "",
		"is_checked": 1,
		"key": "pageno",
		"type": "Text",
		"not_null": 1,
		"field_type": "String",
		"value": "20"
	},
	{
		"description": "",
		"is_checked": 1,
		"key": "count",
		"type": "Text",
		"not_null": 1,
		"field_type": "String",
		"value": "20"
	},
	{
		"description": "",
		"field_type": "String",
		"is_checked": -1,
		"key": "tag",
		"value": "清纯",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "4K专区 ",
		"is_checked": -1,
		"key": "cids",
		"type": "Text",
		"not_null": 1,
		"field_type": "String",
		"value": "36"
	},
	{
		"description": "美女模特",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "6",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "爱情",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "30",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "风景",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "9",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "小清新",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "15",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "动漫",
		"field_type": "String",
		"is_checked": 1,
		"key": "cids",
		"value": "26",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "明星",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "11",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "萌宠",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "14",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "游戏",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "5",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "汽车",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "12",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "炫酷时尚",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "10",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "日历壁纸",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "29",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "影视剧照",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "7",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "节日美图",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "13",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "军事天地",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "22",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "劲爆体育",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "16",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "BABY秀",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "18",
		"not_null": 1,
		"type": "Text"
	},
	{
		"description": "文字控",
		"field_type": "String",
		"is_checked": -1,
		"key": "cids",
		"value": "35",
		"not_null": 1,
		"type": "Text"
	}
]

请求示例

import requests

url = "https://wp.shanhutech.cn/intf/GetListByCategory"

querystring = {"pageno":"20","count":"20","cids":"26"}

headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)

壁纸详情

import requests

url = "https://wp.shanhutech.cn/intf/GetUpOrDownWallpaper"

querystring = {"type":"newest","action":"","value":"","id":"2062166"} # id: 壁纸id

headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)

整合

上面的接口整合一下

# coding: utf-8
# 小鸟壁纸
from typing import Union

import requests
from qfluentwidgets.common.exception_handler import exceptionHandler
from common import cfg, EnumBase

XiaoNiaoBaseUrl = 'https://wp.shanhutech.cn/intf'


class MeiNv(EnumBase):
    QingChun = '清纯'
    XingGan = '性感女神'
    OuMei = '欧美女神'
    WenYi = '文艺古风'

    @staticmethod
    def type():
        return '美女模特'


class AiQing(EnumBase):
    AiQing = '爱情箴言'
    LangMan = '浪漫手绘'
    XinDong = '心动创意'
    WeiMei = '唯美温警'

    @staticmethod
    def type():
        return '爱情'


class FengJing(EnumBase):
    LanTian = '蓝天白云'
    LuoRi = '落日余晖'
    Chun = '春意盎然'
    Xia = '炎炎夏日'
    Qiu = '秋意正浓'
    Bing = '冰天雪地'
    ChengShi = '城市夜景'
    HaiYang = '海洋天堂'
    ZiRan = '自然风光'
    QiHuan = '奇幻梦境'

    @staticmethod
    def type():
        return '风景'


class XiaoQingXin(EnumBase):
    HuYan = '护眼壁纸'
    ShuHuan = '舒缓压力'
    WenXin = '温馨一刻'
    QingXin = '清新淡雅'
    JingWu = '静物写真'
    Niao = '鸟语花香'
    DongGan = '动感水果'
    JiaoYan = '娇艳欲滴'

    @staticmethod
    def type():
        return '小清新'


class DongMan(EnumBase):
    GuoMan = '国漫'
    LongZhu = '龙珠'
    HaiZei = '海贼王'
    HuoYing = '火影忍者'
    QinShi = '秦时明月'
    JuRen = '进击巨人'
    ShiShi = '食尸鬼'
    KaTong = '卡通人物'

    @staticmethod
    def type():
        return '动漫'


class MengChong(EnumBase):
    GuLingJingGuai = '古灵精怪'
    YeSheng = '野生动物'
    JiDi = '极地物种'
    Gou = '汪星人'
    Mao = '喵星人'
    MaiMeng = '卖萌图'
    Hai = '海底世界'
    Niao = '小鸟天地'

    @staticmethod
    def type():
        return '动漫'


class MingXing(EnumBase):
    XiaoZhan = '肖战'
    YangMi = '杨幂'
    YangYang = '杨洋'
    YangYin = '杨颖'
    YangZi = '杨紫'
    YangYan = '唐嫣'
    LiuShiShi = '刘诗诗'
    WangYiBo = '王一博'
    ZhaoLiYing = '赵丽颖'
    ZhangYiXing = '张艺兴'
    TFBOYS = 'TFBOYS'
    DiLiReBa = '迪丽热巴'

    @staticmethod
    def type():
        return '明星'


class YouXi(EnumBase):
    LianMeng = '英雄联盟'
    WangZhe = '王者荣耀'
    MoShou = '魔兽世界'
    ShouWang = '守望先锋'
    ZhuJi = '主机游戏'
    ShouYou = '手游世界'
    ReMen = '热门网游'
    DOTA = 'DOTA2'

    @staticmethod
    def type():
        return '游戏'


class QiChe(EnumBase):
    Bu = '布加迪'
    Lan = '兰博基尼'
    BenChi = '奔驰'
    FaLaLi = '法拉利'
    BaoMa = '宝马'
    LuHu = '路虎'
    FuTe = '福特'
    BinLi = '宾利'
    XueFuLan = '雪佛兰'
    JeiBao = '捷豹'
    HanMa = '悍马'
    JEEP = 'JEEP'
    MaShaLaDi = '玛莎拉蒂'
    AoDi = '奥迪'
    MINI = 'MINI'
    BaoShiJei = '保时捷'
    LaoSiLaiSi = '劳斯莱斯'
    KeEr = '克尔维特'

    @staticmethod
    def type():
        return '汽车'


class XiaoNiaoType(EnumBase):
    _4K = {'name': '4K专区', 'cids': 36}  # 4K专区
    MeiNv = {'name': '美女模特', 'cids': 6, 'type': MeiNv.values()}  # 美女模特
    AiQing = {'name': '爱情', 'cids': 30, 'type': AiQing.values()}  # 爱情
    Fengjing = {'name': '风景', 'cids': 9, 'type': FengJing.values()}  # 风景
    XiaoQingXin = {'name': '小清新', 'cids': 15, 'type': XiaoQingXin.values()}  # 小清新
    DongMan = {'name': '动漫', 'cids': 26, 'type': DongMan.values()}  # 动漫
    MingXing = {'name': '明星', 'cids': 11, 'type': MingXing.values()}  # 明星
    MengChong = {'name': '萌宠', 'cids': 14, 'type': MengChong.values()}  # 萌宠
    Game = {'name': '游戏', 'cids': 5, 'type': YouXi.values()}  # 游戏
    QiChe = {'name': '汽车', 'cids': 12, 'type': QiChe.values()}  # 汽车
    XuanKu = {'name': '炫酷时尚', 'cids': 10}  # 炫酷时尚
    RiLi = {'name': '日历壁纸', 'cids': 29}  # 日历壁纸
    YingShi = {'name': '影视剧照', 'cids': 7}  # 影视剧照
    JeiRi = {'name': '节日美图', 'cids': 13}  # 节日美图
    JunShi = {'name': '军事天地', 'cids': 22}  # 军事天地
    TiYu = {'name': '劲爆体育', 'cids': 16}  # 劲爆体育
    BaBy = {'name': 'BABY秀', 'cids': 18}  # BABY秀
    WenZi = {'name': '文字控', 'cids': 35}  # 文字控

    @classmethod
    def get_cids(cls, key):
        for value in cls.values():
            if value['name'] == key:
                return value['cids']


class Search:
    """
    搜索
    """
    url = XiaoNiaoBaseUrl + '/search?content={content}&pageno={page}&count={count}'
    headers = {'User-Agent': cfg.get(cfg.userAgent)}

    @classmethod
    @exceptionHandler([])
    def send(cls, content: str = '原神', page: int = 1, *, count: int = 30):
        url = cls.url.format(content=content, page=page, count=count)
        response = requests.get(url, headers=cls.headers)
        return response.json()['data']['list']


class GetListByHotTag:
    """
    按热门标签获取列表
    """
    url = XiaoNiaoBaseUrl + '/GetListByHotTag?tag={tag}&pageno={page}&count={count}'
    headers = {'User-Agent': cfg.get(cfg.userAgent)}

    @classmethod
    @exceptionHandler([])
    def send(cls, tag: Union[str, EnumBase], page: int = 1, *, count: int = 30):
        if isinstance(tag, EnumBase):
            tag = tag.value
        url = cls.url.format(tag=tag, page=page, count=count)
        response = requests.get(url, headers=cls.headers)
        return response.json()['data']['list']


class GetListByCategory:
    """
    按类别获取列表
    """
    url = XiaoNiaoBaseUrl + '/GetListByCategory?pageno={page}&count={count}&cids={cids}'
    headers = {'User-Agent': cfg.get(cfg.userAgent)}

    @classmethod
    @exceptionHandler([])
    def send(cls, page: int = 1, cids: int = 36, *, count: int = 30):
        url = cls.url.format(page=page, cids=cids, count=count)
        response = requests.get(url, headers=cls.headers)
        return response.json()['data']['list']


class NewestList:
    """
    最新的列表
    """
    url = 'https://shcdn-wp.shanhutech.cn/intf/newestList?pageno={page}&count={count}'
    headers = {'User-Agent': cfg.get(cfg.userAgent)}

    @classmethod
    @exceptionHandler([])
    def send(cls, page: int = 1, *, count: int = 30):
        url = cls.url.format(page=page, count=count)
        response = requests.get(url, headers=cls.headers)
        return response.json()

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/568445.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Vue3的监听属性watch和计算属性computed

监听属性watch 计算属性computed 一、监听属性watch watch 的第一个参数可以是不同形式的“数据源,watch 可以监听以下几种数据: 一个 ref (包括计算属性)、 一个响应式对象、 一个 getter 函数、 或多个数据源组成的数组 watch 的参数:监视的回调&…

代码随想录算法训练营第三十五天|860.柠檬水找零、406.根据身高重建队列、452. 用最少数量的箭引爆气球

860. 柠檬水找零 思路: 只需要维护三种金额的数量,5,10和20。 有如下三种情况: 情况一:账单是5,直接收下。情况二:账单是10,消耗一个5,增加一个10情况三:…

好友关注-实现分页查询收邮箱

9.5好友关注-实现分页查询收邮箱 需求:在个人主页的“关注”卡片中,查询并展示推送的Blog信息: 具体操作如下: 1、每次查询完成后,我们要分析出查询出数据的最小时间戳,这个值会作为下一次查询的条件 2…

考研党打印资料怎么使用云打印服务?

对于准备考研的同学们来说,在备考的时候需要准备许多资料,这些资料的打印费用成为了考研党的巨额支出。那么在生活费有限的情况下,考研党打印资料最好是选择云打印服务,因为易绘创云打印服务低至5分钱/页还包邮。那么考研党打印资…

Pytest精通指南(28)钩子函数-测试报告(pytest-html)

文章目录 前言应用场景插件安装参数分析使用方法拓展-定制化报告 前言 在软件开发过程中,测试是确保代码质量的关键环节。 而测试报告则是测试过程中不可或缺的输出物,它为我们提供了关于测试用例执行情况的详细信息,帮助我们快速定位和解决问…

服务器(AIX、Linux、UNIX)性能监视器工具【nmon】使用介绍

目录 ■nmon简介 1.安装 2.使用简介 3.使用(具体使用的例子【CPU】【内存】) 4.采集数据 5.查看log(根据结果,生成报表) 6.分析结果 ■nmon简介 nmon("Nigels performance Monitor"&…

比特币成长的代价

作者:Jeffrey Tucker,作家和总裁。曾就经济、技术、社会哲学和文化等话题广泛发表演讲。编译:秦晋 2017 年之后参与比特币市场的人遇到了与之前的人不同的操作和理想。如今,没有人会太在意之前的事情,说的是 2010-2016…

SL3038 耐压150V恒压芯片 60V降24V 72V降12V降压IC

SL3038 是一款恒压芯片,其耐压值为 150V。这意味着它可以在高达 150V 的电压下工作而不会损坏。现在,让我们来讨论您提到的两个降压应用:从 60V 降到 24V 和从 72V 降到 12V。 1. 60V 降到 24V: 输入电压:60V 输出电…

02 IO口的操作

文章目录 前言一、IO的概念1.IO接口2.IO端口 二、CPU和外设进行数据传输的方法1.程序控制方式1.1 无条件1.2 查询方式 2.中断方式3.DMA方式 一、方法介绍和代码编写1.前置知识2.程序方式1.1 无条件方式1.1.1 打开对应的GPIO口1.1.2 初始化对应的GPIO引脚1.1.2.1 推挽输出1.1.2.…

【Hadoop】-Hive部署[12]

目录 思考 VMware虚拟机部署 规划 步骤1:安装MySQL数据库 步骤2:配置Hadoop 步骤3:下载解压Hive 步骤4:提供MySQL Driver包 步骤5:配置Hive 步骤6:初始化元数据库 步骤7:启动Hive&…

TDSQL同一个所属Set显示3个备份节点

欢迎关注“数据库运维之道”公众号,一起学习数据库技术! 本期将为大家分享《TDSQL同一个所属Set显示3个备份节点》的处置案例。 关键词:分布式数据库、TDSQL、备份节点 1、问题描述 登录赤兔管理平台,单击左侧导航栏“实例管理/集群管理”…

漫谈-AI 时代的信息模型

模型化- 数字化转型的重要基石 在各行各业推行数字化转型过程中,构建信息化模型十分重要,它是数字化转型的基石。事实上,数字化转型的核心是“万物皆模型”,在工业领域,以德国为主导的工业4.0 发展进程中,…

Access denied for user ‘zabbix‘@‘localhost‘ (using password: NO)

现象 排查过程 进入数据库show grants for zabbixlocalhost;select host,user from mysql.user;cat /etc/zabbix/zabbix_server.conf | grep DB | grep -vE ‘#|$’cat /etc/zabbix/web/zabbix.conf.php | grep DB 解决办法 mysql 8.0以下 DPassword123.com mariadb -e "…

java多线程-并发和并行

进程 并发 进程中的线程是由CPU进行调度的,但是CPU能够处理的进程数量有限为了保证所有的线程都在运行,CPU会快速切换,给外界的感觉就是所有的线程都在运行,这就是并发。 并行

【力扣 Hot100 | 第六天】4.21(最长连续序列)

文章目录 10.最长连续序列10.1题目10.2解法:哈希法10.2.1哈希思路10.2.2代码实现 10.最长连续序列 10.1题目 给定一个未排序的整数数组 nums ,找出数字连续的最长序列(不要求序列元素在原数组中连续)的长度。 请你设计并实现时…

php 编译安装oracel扩展

第一步安装Oracle客户端 1,需要下载基础包和sdk oracle客户端下载链接:Oracle Instant Client Downloads for Linux x86-64 (64-bit) https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html 选择最新版本 versi…

国产PLC有哪些,哪个牌子比较好用?

你知道国产PLC有哪些吗,哪个牌子更好用吗? 今天拿出国产先锋的汇川与台达对比,注:视频后方有各品牌学习资料免费送,需要的移步自取。话说回来,只要基于Codesys开发的都比较好用,只是使用底层芯片不同&…

2013-2021年各省经济韧性相关测度指标面板数据

2013-2021年各省经济韧性相关测度指标面板数据 1、时间:2013-2021年 2、指标:城镇化率 %、财政科学技术支出(亿元)、万人高等教育在校人数(万人)、财政教育支出(亿元)、第三产业占…

AD 21、22 软件安装教程

AD2022安装包链接 链接:https://pan.baidu.com/s/1oMNbXibQ1Zjl0RTLdPDVGw 提取码:xfs4 软件下载 1.以管理员身份运行 2. 3. 4. 5.路径最好改为C盘以外的,如D盘,要新建一个空文件夹 6. 7.下载好以后 8.在Crack文件夹下找…

程序员周末提升计划:朝网络安全工程师转型之路

作为一名软件开发人员,我一直对网络安全充满兴趣,并希望在未来转型成为一名网络安全工程师。面对网络安全领域的挑战和机遇,我制定了一个周末提升计划,希望能系统地增强我的技能并为这一跨界做好准备。下面,我将分享我…