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

All Samples(30)  |  Call(19)  |  Derive(0)  |  Import(11)

src/p/y/pyload-HEAD/module/plugins/hooks/ExtractArchive.py   pyload(Download)
    from grp import getgrnam
 
from module.utils import save_join, fs_encode
from module.plugins.Hook import Hook, threaded, Expose
from module.plugins.internal.AbstractExtractor import ArchiveError, CRCError, WrongPassword
 
            # determine output folder
            out = save_join(dl, p.folder, "")
            # force trailing slash
 
            if self.getConfig("destination") and self.getConfig("destination").lower() != "none":
 
                out = save_join(dl, p.folder, self.getConfig("destination"), "")
                    makedirs(out)
 
            files_ids = [(save_join(dl, p.folder, x["name"]), x["id"]) for x in p.getChildren().itervalues()]
            matched = False
 

src/p/y/pyload-HEAD/module/web/pyload_app.py   pyload(Download)
from filters import relpath, unquotepath
 
from module.utils import formatSize, save_join, fs_encode, fs_decode
 
# Helper
 
    for item in sorted([fs_decode(x) for x in items]):
        if isdir(save_join(root, item)):
            folder = {
                'name': item,
                'path': item,
                'files': []
            }
            files = listdir(save_join(root, item))
            for file in sorted([fs_decode(x) for x in files]):
                try:
                    if isfile(save_join(root, item, file)):
                        folder['files'].append(file)
                except:

src/p/y/pyload-HEAD/module/plugins/hooks/Checksum.py   pyload(Download)
import re
 
from module.utils import save_join, fs_encode
from module.plugins.Hook import Hook
 
    def packageFinished(self, pypack):
        download_folder = save_join(self.config['general']['download_folder'], pypack.folder, "")
 
        for link in pypack.getChildren().itervalues():
            file_type = splitext(link["name"])[1][1:].lower()
                continue
 
            hash_file = fs_encode(save_join(download_folder, link["name"]))
            if not isfile(hash_file):
                self.logWarning("File not found: %s" % link["name"])
                self.logDebug(link["name"], data)
 
                local_file = fs_encode(save_join(download_folder, data["name"]))
                algorithm = self.methods.get(file_type, file_type)
                checksum = computeChecksum(local_file, algorithm)

src/p/y/pyload-HEAD/module/plugins/Plugin.py   pyload(Download)
from itertools import islice
 
from module.utils import save_join, save_path, fs_encode, fs_decode
 
def chunks(iterable, size):
        download_folder = self.config['general']['download_folder']
 
        location = save_join(download_folder, self.pyfile.package().folder)
 
        if not exists(location):
 
        download_folder = self.config['general']['download_folder']
        location = save_join(download_folder, pack.folder, self.pyfile.name)
 
        if starting and self.core.config['download']['skip_existing'] and exists(location):

src/p/y/pyload-HEAD/module/plugins/hooks/ExternalScripts.py   pyload(Download)
 
from module.plugins.Hook import Hook
from module.utils import save_join
 
 
    def downloadFinished(self, pyfile):
        for script in self.scripts['download_finished']:
            self.callScript(script, pyfile.pluginname, pyfile.url, pyfile.name,
                            save_join(self.config['general']['download_folder'],
                                      pyfile.package().folder, pyfile.name), pyfile.id)
 
    def packageFinished(self, pypack):
        for script in self.scripts['package_finished']:
            folder = self.config['general']['download_folder']
            folder = save_join(folder, pypack.folder)

src/p/y/pyload-HEAD/module/plugins/crypter/YoutubeBatch.py   pyload(Download)
from module.common.json_layer import json_loads
from module.plugins.Crypter import Crypter
from module.utils import save_join
 
API_KEY = "AIzaSyCKnWLNlkX-L4oD1aEzqqhRw1zczeD6_k0"
            p_name = p["title"]
            p_videos = self.getVideosId(p["id"])
            p_folder = save_join(self.config['general']['download_folder'], p["channelTitle"], p_name)
            self.logDebug("%s video\s found on playlist \"%s\"" % (len(p_videos), p_name))
 

src/p/y/pyload-HEAD/module/plugins/crypter/DailymotionBatch.py   pyload(Download)
from module.common.json_layer import json_loads
from module.plugins.Crypter import Crypter
from module.utils import save_join
 
 
        for p_id, p_name, p_owner in playlists:
            p_videos = self.getVideos(p_id)
            p_folder = save_join(self.config['general']['download_folder'], p_owner, p_name)
            self.logDebug("%s video\s found on playlist \"%s\"" % (len(p_videos), p_name))
            self.packages.append((p_name, p_videos, p_folder))  #: folder is NOT recognized by pyload 0.4.9!

src/p/y/pyload-HEAD/module/network/HTTPDownload.py   pyload(Download)
 
from module.plugins.Plugin import Abort
from module.utils import save_join, fs_encode
 
class HTTPDownload():
 
        if self.nameDisposition and self.disposition:
            self.filename = save_join(dirname(self.filename), self.nameDisposition)
 
        move(init, fs_encode(self.filename))

src/p/y/pyload-HEAD/module/plugins/hooks/MergeFiles.py   pyload(Download)
 
from os.path import join
from module.utils import save_join, fs_encode
from module.plugins.Hook import Hook
 
 
        if self.config['general']['folder_per_package']:
            download_folder = save_join(download_folder, pack.folder)
 
        for name, file_list in files.iteritems():

src/p/y/pyload-HEAD/module/plugins/internal/UnRar.py   pyload(Download)
from string import digits
 
from module.utils import save_join, decode
from module.plugins.internal.AbstractExtractor import AbtractExtractor, WrongPassword, ArchiveError, CRCError
 
        for f in decode(out).splitlines():
            f = f.strip()
            result.add(save_join(self.out, f))
 
        self.files = result

  1 | 2  Next