Esempio n. 1
0
 def get_folder_name(self):
     """
     How should the folder be named where images from this source are downloaded to
     :return: folder name (just name, not full path)
     """
     if self.config:
         return self.get_source_type() + "_" + Util.convert_to_filename(
             self.config)
     else:
         return self.get_source_name()
Esempio n. 2
0
 def test_convert_url(self):
     self.assertEqual(
         "wallpapers_net_some_category_html",
         Util.convert_to_filename(
             "http://wallpapers.net/some-category.html"),
     )