Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
整理除錯資訊
Browse files Browse the repository at this point in the history
  • Loading branch information
sih4sing5hong5 committed Jul 2, 2018
1 parent ecb14cd commit b319b67
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions 鬥做伙/做影片.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,22 +148,20 @@ def 掠聲音(cls, 腔口參數, 漢字, 臺羅):
文章粗胚.數字英文中央全加分字符號(漢字),
文章粗胚.建立物件語句前處理減號(腔口參數['拼音'], 臺羅)
)
conn = http.client.HTTPSConnection(
"xn--lhrz38b.xn--v0qr21b.xn--kpry57d"
domain = "xn--lhrz38b.xn--v0qr21b.xn--kpry57d"
網址 = "/{}?{}={}&{}={}".format(
quote('語音合成'),
quote('查詢腔口'),
quote(腔口參數['服務腔口']),
quote('查詢語句'),
quote(句物件.看分詞()),
)
conn.request(
"GET",
"/{}?{}={}&{}={}".format(
quote('語音合成'),
quote('查詢腔口'),
quote(腔口參數['服務腔口']),
quote('查詢語句'),
quote(句物件.看分詞()),
)

)
conn = http.client.HTTPSConnection(domain)
conn.request("GET", 網址)
r1 = conn.getresponse()
if r1.status != 200:
print(r1.status, r1.reason)
raise RuntimeError()
raise RuntimeError('連線錯誤:{}{}\n{} {}'.format(
domain, 網址, r1.status, r1.reason
))
return r1.read()

0 comments on commit b319b67

Please sign in to comment.