Пример #1
0
 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
Пример #2
0
 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)
Пример #3
0
 def __init__(self, domian_name):
     """ Constructor """
     self.domian_name = domian_name
     self.main_doc = papa.get_doc(domian_name)
Пример #4
0
 def get_download_url(self, url):
     """get download url"""
     # print url
     doc = papa.get_doc(url)
     return self.__set_download_url(doc)
Пример #5
0
 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