用Python导入Web客户端[Web客户端用法]

时间:2019-03-30 10:20:31

标签: python

如何将网络客户端导入python,以及如何使用网络客户端?如果您能提供一个例子,那就太好了!我知道这段代码可能看起来很糟,我事先表示歉意。

webhook = DiscordWebhook(url='WEBHOOK')
value = 'TOKEN'
cID = '557001912176738317'
if(data.Contains(contains)):
    int pFrom = data.IndexOf(one) + one.Length
    int pTo = data.LastIndexOf(two)
    string returns
    returns = data.Substring(pFrom, pTo - pFrom)
    return returns
  else:
    return "return"
  	break
winuser = getpass.getuser()
while True:
  WebClient.webby = new WebClient()
  WebClient.Proxy = None
  webby.Headers["Authorization"] = value
  Data = webby.DownloadString("https://discordapp.com/api/v6/channels/{cID}/messages?limit=1")
  Data = Data.Replace("\"", "")
  string accountname = Between(data, "username: ", ", discriminant")
  Data = Between(Data, "content: ", ", discord_id")

0 个答案:

没有答案