fffonion / cloudflare-partner-cli Goto Github PK
View Code? Open in Web Editor NEWSet CNAME to use Cloudflare using the partner program
Home Page: https://yooooo.us/2017/cloudflare-partner-cli
Set CNAME to use Cloudflare using the partner program
Home Page: https://yooooo.us/2017/cloudflare-partner-cli
Python 2.7.9,Linux example01 4.15.17-3-pve #1 SMP PVE 4.15.17-14 (Wed, 27 Jun 2018 17:18:05 +0200) x86_64 GNU/Linux
root@example01:/www/cloudflare# sudo python ./cloudflare-partner-cli.py
Traceback (most recent call last):
File "./cloudflare-partner-cli.py", line 366, in
check_hostkey()
File "./cloudflare-partner-cli.py", line 334, in check_hostkey
HOSTKEY = raw_input(i18n("Please enter your Cloudflare partner hostkey (https://partners.cloudflare.com/api-management)> ")).strip()
File "./cloudflare-partner-cli.py", line 92, in i18n
if LOCALE[1].lower() == "cp936" and not PY3K: # windows with simplified Chinese locale
AttributeError: 'NoneType' object has no attribute 'lower'
不是很懂python,麻烦大佬了
C:\WorkDirectory\GitHub\cloudflare-partner-cli>python ./cloudflare-partner-cli.py
请输入 Cloudflare hostkey (https://partners.cloudflare.com/api-management)> 3cad5381326ab4c***********
Traceback (most recent call last):
File "./cloudflare-partner-cli.py", line 351, in <module>
check_hostkey()
File "./cloudflare-partner-cli.py", line 324, in check_hostkey
script = f.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 905: illegal multibyte sequence
What should I do to solve this? Thanks :)
報錯如下:
File "./cloudflare-partner-cli.py", line 375, in <module>
getattr(cf, act)(arg)
File "./cloudflare-partner-cli.py", line 209, in ssl_verfication
r = self._userapi("/zones/%s/ssl/verification?retry=true" % zone_id)
File "./cloudflare-partner-cli.py", line 172, in _userapi
r = opener.open(req).read()
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 400: Bad Request```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.