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

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

src/p/i/PixivUtil2-HEAD/PixivUtil2.py   PixivUtil2(Download)
                filename = os.path.split(url)[1]
                filename = filename.split("?")[0]
                filename = PixivHelper.sanitizeFilename(filename)
                save = file(filename + '.pixiv', 'wb+', 4096)
                msg2 = 'File is saved to ' + filename
                                                        tagsLimit=__config__.tagsLimit, fileUrl=url, bookmark=bookmark,
                                                        searchTags=search_tags)
                    filename = PixivHelper.sanitizeFilename(filename, target_dir)
 
                    if image.imageMode == 'manga' and __config__.createMangaDir:
        if use_tags_as_dir:
            print "Save to each directory using query tags."
            __config__.rootDirectory += os.sep + PixivHelper.sanitizeFilename(search_tags)
 
        if not tags.startswith("%"):
                                                        tagsSeparator=__config__.tagsSeparator,
                                                        tagsLimit=__config__.tagsLimit, fileUrl=image_data.imageUrls[0])
                    filename = PixivHelper.sanitizeFilename(filename, __config__.rootDirectory)
                    PixivHelper.safePrint("Filename  : " + filename)
                    download_image(image_data.imageUrls[0], filename, url, __config__.overwrite, __config__.retry,

src/p/i/PixivUtil2-HEAD/PixivModel.py   PixivUtil2(Download)
                    if re.match(r'[a-zA-Z]:', path):
                        dirpath = path.split(os.sep, 1)
                        dirpath[1] = PixivHelper.sanitizeFilename(dirpath[1], None)
                        path = os.sep.join(dirpath)
                    else:
                        path = PixivHelper.sanitizeFilename(path, rootDir)

src/p/i/PixivUtil2-HEAD/test.PixivHelper.py   PixivUtil2(Download)
    expected = currentDir + os.sep + filename
 
    result = PixivHelper.sanitizeFilename(filename, rootDir)
 
    self.assertEqual(result, expected)
    expected = currentDir + os.sep + filename
 
    result = PixivHelper.sanitizeFilename(filename, rootDir)
 
    self.assertEqual(result, expected)