Exemple #1
0
 def __init__(self, first_page):
     Factory.__init__(self)
     self.first_page = first_page
     self.category = urlparse.urlsplit(first_page).path.split("/")[2]
     self.save_path = os.path.join("ccrt", self.category)
     self.filename = "subject_urls_" + self.category + ".txt"
     self.d_filename = "subject_urls_" + self.category + "_d.txt"
Exemple #2
0
 def __init__(self, first_page):
     Factory.__init__(self)
     self.first_page = first_page
     p = urlparse.urlsplit(first_page).path.split("/")[-1]
     if p == "1_1.html":
         self.category = "yazhou"
     elif p == "2_1.html":
         self.category = "oumei"
     assert(self.category)
     self.save_path = os.path.join("art", self.category)
     self.filename = "subject_urls_" + self.category + ".txt"
     self.d_filename = "subject_urls_" + self.category + "_d.txt"