This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://clash-verge-rev.github.io/guide/script.html?h=rule+provider#1 | |
// 国内DNS服务器 | |
const domesticNameservers = [ | |
"https://dns.alidns.com/dns-query", // 阿里云公共DNS | |
"https://doh.pub/dns-query", // 腾讯DNSPod | |
"https://doh.360.cn/dns-query" // 360安全DNS | |
]; | |
// 国外DNS服务器 | |
const foreignNameservers = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myJsonify(json: any, level = 0): string { | |
let result = ''; | |
if (Array.isArray(json)) { | |
result += "[\n"; | |
for (const item of json) { | |
for (let i = 0; i < level * 2 + 2; i++) { | |
result += ' '; | |
} | |
result += `${myJsonify(item, level + 1)},\n`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests as rq | |
import json | |
# 获取 access_token | |
url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=YOUR_APP_ID&secret=YOUR_SECRET' | |
res = rq.get(url) | |
json = res.json() | |
access_token = json['access_token'] | |
# print(access_token) |