Ejemplo n.º 1
0
    def get_anime_list(self, letter):
        filter_regx = re.compile("<div\sid=\"nm%(ll)s\"\sname=\"nm%(ll)s\"\sclass=\"panel-body\">%(ul)s</div><div\sclass=\"panel-footer\"><ul\sclass=\"series_alpha\">(.+?)</ul>" % {"ul": letter.upper(), "ll": letter.lower()}, re.DOTALL)
        resp = self._get_request(self._to_url("series"))
        filtered = filter_regx.findall(resp)[0]

        results = []
        for res in self._ANIME_LIST_RESULTS_RE.findall(filtered):
            results.append(control.allocate_item(res[1], "animes/%s/" % res[0], True, ''))
        return results
Ejemplo n.º 2
0
    def get_latest(self):
        resp = self._get_request(self._to_url())
        resp = self._NEWMANGA_CONT_RE.findall(resp)

        results = []
        for container in resp:
            for res in self._LATEST_LINK_RE.findall(container):
                image = "http:%s" % res[3]
                name = res[2]
                results.append(control.allocate_item(name, "play/" + res[0] + "/" + res[1], False, image))
        return results
Ejemplo n.º 3
0
    def get_anime_episodes(self, anime_url):
        resp = self._get_request(self._to_url("/series/%s" % anime_url))
        resp = self._NEWMANGA_CONT_RE.findall(resp)[0]

        results = []
        for res in self._EPISODE_LINK_RE.findall(resp):
            ep_name = res[3].strip()
            if len(ep_name):
                name = "%s : %s" % (res[2] , ep_name)
            else:
                name = res[2]
            results.append(control.allocate_item(name, "play/" + res[0] + "/" + res[1], False, ''))
        return results
Ejemplo n.º 4
0
    def get_latest(self):
        resp = self._get_request(self._to_url())
        resp = self._NEWMANGA_CONT_RE.findall(resp)

        results = []
        for container in resp:
            for res in self._LATEST_LINK_RE.findall(container):
                image = "http:%s" % res[3]
                name = res[2]
                results.append(
                    control.allocate_item(name,
                                          "play/" + res[0] + "/" + res[1],
                                          False, image))
        return results
Ejemplo n.º 5
0
    def get_anime_episodes(self, anime_url):
        resp = self._get_request(self._to_url("/series/%s" % anime_url))
        resp = self._NEWMANGA_CONT_RE.findall(resp)[0]

        results = []
        for res in self._EPISODE_LINK_RE.findall(resp):
            ep_name = res[3].strip()
            if len(ep_name):
                name = "%s : %s" % (res[2], ep_name)
            else:
                name = res[2]
            results.append(
                control.allocate_item(name, "play/" + res[0] + "/" + res[1],
                                      False, ''))
        return results
Ejemplo n.º 6
0
    def get_anime_list(self, letter):
        filter_regx = re.compile(
            "<div\sid=\"nm%(ll)s\"\sname=\"nm%(ll)s\"\sclass=\"panel-body\">%(ul)s</div><div\sclass=\"panel-footer\"><ul\sclass=\"series_alpha\">(.+?)</ul>"
            % {
                "ul": letter.upper(),
                "ll": letter.lower()
            }, re.DOTALL)
        resp = self._get_request(self._to_url("series"))
        filtered = filter_regx.findall(resp)[0]

        results = []
        for res in self._ANIME_LIST_RESULTS_RE.findall(filtered):
            results.append(
                control.allocate_item(res[1], "animes/%s/" % res[0], True, ''))
        return results
Ejemplo n.º 7
0
def LIST_MENU(payload):
    return control.draw_items([control.allocate_item(name, url, True) for name, url in MENU_ITEMS])
Ejemplo n.º 8
0
def LIST_ALL_AB(payload):
    return control.draw_items([control.allocate_item(i, "all/%s" % i, True) for i in AB_LIST])
Ejemplo n.º 9
0
 def _parse_search_result(self, res):
     name = self._NAME_LINK_RE.findall(res[1])[0]
     image = "http:%s" % self._SEARCH_IMAGE_RE.findall(res[1])[0]
     url = res[0]
     return control.allocate_item(name, "animes/" + url + "/", True, image)
Ejemplo n.º 10
0
 def _parse_search_result(self, res):
     name = self._NAME_LINK_RE.findall(res[1])[0]
     image = "http:%s" % self._SEARCH_IMAGE_RE.findall(res[1])[0]
     url = res[0]
     return control.allocate_item(name, "animes/" + url + "/", True, image)
Ejemplo n.º 11
0
def LIST_MENU(payload):
    return control.draw_items(
        [control.allocate_item(name, url, True) for name, url in MENU_ITEMS])
Ejemplo n.º 12
0
def LIST_ALL_AB(payload):
    return control.draw_items(
        [control.allocate_item(i, "all/%s" % i, True) for i in AB_LIST])