Exemplo n.º 1
0
 def __init__(self, bookId="", page=""):
     url = config.Url + "comics/{}/eps?page={}".format(bookId, page)
     method = "GET"
     self.bookId = bookId
     super(self.__class__, self).__init__(url,
                                          ToolUtil.GetHeader(url, method),
                                          {}, method)
Exemplo n.º 2
0
 def __init__(self, user: str, passwd: str):
     url = config.Url + "auth/sign-in"
     method = "POST"
     super(self.__class__, self).__init__(url,
                                          ToolUtil.GetHeader(url, method), {
                                              "email": user,
                                              "password": passwd
                                          }, method)
Exemplo n.º 3
0
 def __init__(self, page, categories, sort=""):
     categories = quote(categories)
     url = config.Url + "comics?page={}&c={}&s={}".format(
         page, categories, sort)
     method = "GET"
     super(self.__class__, self).__init__(url,
                                          ToolUtil.GetHeader(url, method),
                                          {}, method)
Exemplo n.º 4
0
 def __init__(self, url, path="", isSaveCache=False):
     url = url + "/static/{}".format(path)
     method = "Download"
     self.url = url
     self.path = path
     self.isSaveCache = isSaveCache
     super(self.__class__, self).__init__(url,
                                          ToolUtil.GetHeader(url, method),
                                          {}, method)
Exemplo n.º 5
0
 def __init__(self, page, categories, keyword="", sort=""):
     url = config.Url + "comics/advanced-search?page={}".format(page)
     method = "POST"
     super(self.__class__, self).__init__(url,
                                          ToolUtil.GetHeader(url, method), {
                                              "categories": categories,
                                              "keyword": keyword,
                                              "sort": sort
                                          }, method)
Exemplo n.º 6
0
 def __init__(self):
     url = SpeedTestReq.URLS[SpeedTestReq.Index]
     SpeedTestReq.Index += 1
     if SpeedTestReq.Index >= len(SpeedTestReq.URLS):
         SpeedTestReq.Index = 0
     method = "Download"
     header = ToolUtil.GetHeader(url, method)
     header['cache-control'] = 'no-cache'
     header['expires'] = '0'
     header['pragma'] = 'no-cache'
     super(self.__class__, self).__init__(url, header,
                                          {}, method)
Exemplo n.º 7
0
 def __init__(self, data):
     # data = {
     #     "email": email,
     #     "password": password,
     #     "name": name,
     #     "birthday": birthday,
     #     "gender": gender,  # m, f, bot
     #     "answer1": answer1,
     #     "answer2": answer2,
     #     "answer3": answer3,
     #     "question1": question1,
     #     "question2": question2,
     #     "question3": question3
     # }
     url = config.Url + "auth/register"
     method = "POST"
     super(self.__class__, self).__init__(url, ToolUtil.GetHeader(url, method),
                                          data, method)
Exemplo n.º 8
0
 def __init__(self):
     url = config.Url + "users/profile"
     method = "GET"
     super(self.__class__, self).__init__(url,
                                          ToolUtil.GetHeader(url, method),
                                          {}, method)
Exemplo n.º 9
0
 def __init__(self):
     url = config.Url + "init?platform=android"
     method = "GET"
     super(self.__class__, self).__init__(url,
                                          ToolUtil.GetHeader(url, method),
                                          {}, method)
Exemplo n.º 10
0
 def __init__(self, data):
     url = config.Url + "comics/leaderboard?tt={}&ct=VC".format(data)
     method = "GET"
     super(self.__class__, self).__init__(url,
                                          ToolUtil.GetHeader(url, method),
                                          {}, method)
Exemplo n.º 11
0
 def __init__(self, comentId="", page=1):
     url = config.Url + "comments/{}/childrens?page={}".format(comentId, page)
     method = "Get"
     super(self.__class__, self).__init__(url, ToolUtil.GetHeader(url, method),
                                          {}, method)
Exemplo n.º 12
0
 def __init__(self, bookId):
     url = config.Url + "comics/{}/favourite".format(bookId)
     method = "POST"
     super(self.__class__, self).__init__(url,
                                          ToolUtil.GetHeader(url, method),
                                          {}, method)
Exemplo n.º 13
0
 def __init__(self, page=""):
     url = config.Url + "users/favourite?s=da&page={}".format(page)
     method = "GET"
     super(self.__class__, self).__init__(url,
                                          ToolUtil.GetHeader(url, method),
                                          {}, method)
Exemplo n.º 14
0
 def __init__(self):
     url = config.Url + "comics/random"
     method = "GET"
     super(self.__class__, self).__init__(url, ToolUtil.GetHeader(url, method), {}, method)
Exemplo n.º 15
0
 def __init__(self):
     url = config.Url + "users/punch-in"
     method = "POST"
     super(self.__class__, self).__init__(url,
                                          ToolUtil.GetHeader(url, method),
                                          {}, method)
Exemplo n.º 16
0
 def __init__(self):
     url = config.Url + "categories"
     method = "GET"
     super(self.__class__, self).__init__(url,
                                          ToolUtil.GetHeader(url, method),
                                          {}, method)
Exemplo n.º 17
0
 def __init__(self, comentId="", content=""):
     url = config.Url + "comments/{}".format(comentId)
     method = "POST"
     super(self.__class__, self).__init__(url, ToolUtil.GetHeader(url, method),
                                          {"content": content}, method)