本地调试导致API返回403的注释代码
This commit is contained in:
parent
223a1077bf
commit
cd8fb2ad83
13
Gmeek.py
13
Gmeek.py
@ -71,13 +71,12 @@ class GMEEK():
|
||||
return user.get_repo(repo)
|
||||
|
||||
def markdown2html(self,mdstr):
|
||||
return mdstr
|
||||
# payload = {"text": mdstr, "mode": "markdown"}
|
||||
# ret=requests.post("https://api.github.com/markdown", json=payload,headers={"Authorzation":"token {}".format(self.options.github_token)})
|
||||
# if ret.status_code==200:
|
||||
# return ret.text
|
||||
# else:
|
||||
# raise Exception("markdown2html error status_code=%d"%(ret.status_code))
|
||||
payload = {"text": mdstr, "mode": "markdown"}
|
||||
ret=requests.post("https://api.github.com/markdown", json=payload,headers={"Authorzation":"token {}".format(self.options.github_token)})
|
||||
if ret.status_code==200:
|
||||
return ret.text
|
||||
else:
|
||||
raise Exception("markdown2html error status_code=%d"%(ret.status_code))
|
||||
|
||||
def renderHtml(self,template,blogBase,postListJson,htmlDir):
|
||||
file_loader = FileSystemLoader('templates')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user