LeetCode-CN ranking and ac numbers
show your leetcode-cn ranking nums and ac nums
Node-RED
AWTRIX 3
About this flow
| System | Node-RED |
|---|---|
| AWTRIX version | AWTRIX 3 |
| Topic | Social |
| Built by | UniqueDing |
| File | zB235eRpArLJ.json · 6.3 KB |
| Icons | 1 |
| Published | 25 Aug 2025 · updated 25 Aug 2025 |
| Downloads | 41 |
Is this your flow?
If you created this flow, open your saved edit link to add it to your account. You can then manage it whenever you sign in. Adding it to your account replaces the edit link.
show your leetcode-cn ranking nums and ac nums
- modify Data node uid to your username
- modify http-request node Refer uid to your username, like "https://leetcode.cn/u/exampleusername"
e-mail uniqueding@uniqueding.xyz
zB235eRpArLJ.json
[
{
"id": "4355973d2ef110b2",
"type": "group",
"z": "07631b920c07d557",
"name": "App: Leetcode-cn Ranking and ACs",
"style": {
"label": true
},
"nodes": [
"5a01f5b232184241",
"339afde8415427d8",
"5deec881619897b6",
"9009ae2066baa8ea",
"e5dc767d18bcce7e",
"4ecfbb831637a2b6",
"68559fb02adc2c3d",
"9e76521ae57d2d0b"
],
"x": 54,
"y": 99,
"w": 932,
"h": 162
},
{
"id": "5a01f5b232184241",
"type": "inject",
"z": "07631b920c07d557",
"g": "4355973d2ef110b2",
"name": "",
"props": [],
"repeat": "600",
"crontab": "",
"once": true,
"onceDelay": "1",
"topic": "",
"x": 150,
"y": 180,
"wires": [
[
"4ecfbb831637a2b6"
]
]
},
{
"id": "339afde8415427d8",
"type": "http request",
"z": "07631b920c07d557",
"g": "4355973d2ef110b2",
"name": "",
"method": "POST",
"ret": "obj",
"paytoqs": "query",
"url": "https://leetcode-cn.com/graphql/",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [
{
"keyType": "other",
"keyValue": "User-Agent",
"valueType": "other",
"valueValue": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"
},
{
"keyType": "other",
"keyValue": "Refer",
"valueType": "other",
"valueValue": "https://leetcode.cn/u/uid"
}
],
"x": 420,
"y": 180,
"wires": [
[
"5deec881619897b6",
"68559fb02adc2c3d"
]
]
},
{
"id": "5deec881619897b6",
"type": "function",
"z": "07631b920c07d557",
"g": "4355973d2ef110b2",
"name": "parser rank",
"func": "const json = msg.payload;\nconst rank = json.data.userProfilePublicProfile.siteRanking;\nmsg.payload = {\n text: rank,\n icon: \"70056\",\n};\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 590,
"y": 160,
"wires": [
[
"9009ae2066baa8ea"
]
]
},
{
"id": "9009ae2066baa8ea",
"type": "mqtt out",
"z": "07631b920c07d557",
"g": "4355973d2ef110b2",
"name": "",
"topic": "awtrix/custom/leetcodecn-rank",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "mqtt_broker",
"x": 830,
"y": 160,
"wires": []
},
{
"id": "e5dc767d18bcce7e",
"type": "comment",
"z": "07631b920c07d557",
"g": "4355973d2ef110b2",
"name": "Leetcode-cn Ranking and AC numbers",
"info": "1. modify Data node uid to your username\n2. modify http-request node Refer uid to your username, like \"https://leetcode.cn/u/exampleusername\"",
"x": 250,
"y": 140,
"wires": []
},
{
"id": "4ecfbb831637a2b6",
"type": "function",
"z": "07631b920c07d557",
"g": "4355973d2ef110b2",
"name": "Data",
"func": "const uid = \"exampleusername\";\nmsg.payload = {\n \"operationName\": \"userPublicProfile\",\n \"variables\": { \"userSlug\": uid },\n \"query\": \"query userPublicProfile($userSlug: String!) {\\n userProfilePublicProfile(userSlug: $userSlug) {\\n siteRanking\\n submissionProgress {\\n acTotal\\n }\\n }\\n}\"\n};\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 180,
"wires": [
[
"339afde8415427d8"
]
]
},
{
"id": "68559fb02adc2c3d",
"type": "function",
"z": "07631b920c07d557",
"g": "4355973d2ef110b2",
"name": "parse ac",
"func": "const json = msg.payload;\nconst ac = json.data.userProfilePublicProfile.submissionProgress.acTotal;\nmsg.payload = {\n text: \"A \"+ac,\n icon: \"70056\",\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 580,
"y": 220,
"wires": [
[
"9e76521ae57d2d0b"
]
]
},
{
"id": "9e76521ae57d2d0b",
"type": "mqtt out",
"z": "07631b920c07d557",
"g": "4355973d2ef110b2",
"name": "",
"topic": "awtrix/custom/leetcodecn-ac",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "mqtt_broker",
"x": 820,
"y": 220,
"wires": []
},
{
"id": "mqtt_broker",
"type": "mqtt-broker",
"name": "MQTT Broker",
"broker": "nas.uniqueding.xyz",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": 15,
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]
This flow uses the following icons. Add them to your AWTRIX along with the flow.
8×8 px