Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/p/i/PixivUtil2-HEAD/PixivUtil2.py   PixivUtil2(Download)
                    target_dir = user_dir
 
                avatar_filename = PixivHelper.CreateAvatarFilename(filename_format, __config__.tagsSeparator,
                                                                   __config__.tagsLimit, artist, target_dir)
                download_image(artist.artistAvatar, avatar_filename, list_page.geturl(), __config__.overwrite,

src/p/i/PixivUtil2-HEAD/test.PixivHelper.py   PixivUtil2(Download)
    tagsLimit = 0
    targetDir = ''
    filename = PixivHelper.CreateAvatarFilename(filenameFormat, tagsSeparator, tagsLimit, artist, targetDir)
    ##print filename
    self.assertEqual(filename, self.currPath + os.sep + u'folder.jpg')
    tagsLimit = 0
    targetDir = ''
    filename = PixivHelper.CreateAvatarFilename(filenameFormat, tagsSeparator, tagsLimit, artist, targetDir)
    ##print filename
    self.assertEqual(filename, self.currPath + os.sep + u'kirabara29 (1107124)\\folder.jpg')
    tagsLimit = 0
    targetDir = os.path.abspath('.')
    filename = PixivHelper.CreateAvatarFilename(filenameFormat, tagsSeparator, tagsLimit, artist, targetDir)
    ##print filename
    self.assertEqual(filename, targetDir + os.sep + u'folder.jpg')
    tagsLimit = 0
    targetDir = os.path.abspath('.')
    filename = PixivHelper.CreateAvatarFilename(filenameFormat, tagsSeparator, tagsLimit, artist, targetDir)
    ##print filename
    self.assertEqual(filename, targetDir + os.sep + u'kirabara29 (1107124)\\folder.jpg')
    tagsLimit = 0
    targetDir = 'C:\\images'
    filename = PixivHelper.CreateAvatarFilename(filenameFormat, tagsSeparator, tagsLimit, artist, targetDir)
    ##print filename
    self.assertEqual(filename, u'C:\\images\\folder.jpg')