快速获取星座排盘API接口- python版

根据输入的参数,查看某个星座的信息。
API:https://www.tanshuapi.com/market/detail-93

接口python请求示例

import requests

url = "http://api.tanshuapi.com/api/constellation/v1/index"

payload={}


response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

返回内容介绍:

{
    "code": 1,
    "msg": "操作成功",
    "data": {
        "name": "白羊座",
        "friend": "摩羯座",
        "color": "棕色",
        "date": "20240113",
        "datetime": "2024年01月13日",
        "health": "75",
        "love": "75",
        "work": "90",
        "money": "90",
        "number": "5",
        "all": "90",
        "summary": "运势平稳,头脑保持清醒,利于快速解决问题。你对待事情的态度积极乐观,充满了自信和勇气。"
    }
}

根据出生的年月日,确定你的排盘等信息。
API:https://www.tanshuapi.com/market/detail-79

接口python请求示例

import requests

url = "http://api.tanshuapi.com/api/bazi/v1/paipan"

payload={}


response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

接口返回示例

{
    "code": 1,
    "msg": "操作成功",
    "data": {
        "year": "1985",
        "month": "02",
        "day": "15",
        "hour": "01",
        "minute": "10",
        "name": "",
        "city": "",
        "sex": 0,
        "istaiyang": 0,
        "lunaryear": 1984,
        "lunarmonth": "腊月",
        "lunarday": "廿六",
        "lunarhour": "丑时",
        "animal": "鼠",
        "yearganzhi": "甲子",
        "jieqiprev": {
            "jieqiname": "立春",
            "date": "1985-02-04 05:11:47"
        },
        "jieqinext": {
            "jieqiname": "惊蛰",
            "date": "1985-03-05 23:16:21"
        }
    }
}

你可能感兴趣的:(API接口,API接口,网络,python)