def get_download_count(self, url): """get download count function""" if url != None: doc = papa.get_doc(url) return self.__set_download_count(doc) else: return None
def __get_doc_by_domian_name(self): """ get index doc by domian name """ index_url = self.main_doc('a:first').attr('href') return papa.get_doc(self.domian_name + index_url)
def __init__(self, domian_name): """ Constructor """ self.domian_name = domian_name self.main_doc = papa.get_doc(domian_name)
def get_download_url(self, url): """get download url""" # print url doc = papa.get_doc(url) return self.__set_download_url(doc)
def __get_post_rows(self, url): """ get selected post list area """ doc = papa.get_doc(url) trs = self.__get_trs(doc) rows = self.__get_selected_rows(trs) return rows