-
Notifications
You must be signed in to change notification settings - Fork 2
/
constants.py
74 lines (56 loc) · 1.76 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# @Author : bajins https://www.bajins.com
# @File : constants.py
# @Version: 1.0.0
# @Time : 2019/8/21 15:32
# @Project: windows-wallpaper-python
# @Package:
# @Software: PyCharm
import os
import sys
APP_NAME = "Bajins工具"
# 解释器目录路径
EXECUTABLE_PATH = os.path.dirname(os.path.realpath(sys.executable))
# exe路径
APP_PATH = os.path.realpath(sys.argv[0])
# exe目录
APP_DIRECTORY = os.path.dirname(APP_PATH)
# 当前文件所在目录路径
CURRENT_PATH = os.path.dirname(__file__)
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) " \
"Chrome/77.0.3865.75 Safari/537.36 "
# 缓存目录路径
TEMP_PATH = sys.path[1]
# logo图片地址
LOGO_PATH = os.path.join(TEMP_PATH, "static", "logo.png")
# 数据目录
DATA_PATH = os.path.join(CURRENT_PATH, "data")
# 配置路径
APP_CONF = os.path.join(APP_DIRECTORY, "app.conf")
HOSTS_PATH = "C:\\Windows\\System32\\drivers\\etc\\hosts"
CHINAZ_DNS = "http://tool.chinaz.com/dns"
MYSSL_DNS = "https://myssl.com/api/v1/tools/dns_query"
SHORT_TIME_MAIL = "https://shorttimemail.com"
SHORT_TIME_MAIL_DNS = SHORT_TIME_MAIL + "/net/dns/query"
LIN_SHI_YOU_XIANG = "https://www.linshiyouxiang.net"
GITHUB_DOMAIN = [
"assets-cdn.github.com",
"avatars.githubusercontent.com",
"avatars0.githubusercontent.com",
"avatars1.githubusercontent.com",
"codeload.github.com",
"documentcloud.github.com",
"gist.github.com",
"github.com",
"github.global.ssl.fastly.net",
"github.io",
"github-cloud.s3.amazonaws.com",
"global-ssl.fastly.net",
"help.github.com",
"nodeload.github.com",
"raw.github.com",
"status.github.com",
"training.github.com",
"www.github.com"
]