rename a few files
This commit is contained in:
@@ -16,7 +16,7 @@ __email__ = "mike_faehrmann@web.de"
|
||||
|
||||
import os
|
||||
import argparse
|
||||
from . import config, extractor, jobs
|
||||
from . import config, extractor, job
|
||||
|
||||
def build_cmdline_parser():
|
||||
parser = argparse.ArgumentParser(
|
||||
@@ -81,11 +81,11 @@ def main():
|
||||
if not args.urls:
|
||||
parser.error("the following arguments are required: URL")
|
||||
if args.list_urls:
|
||||
jobtype = jobs.UrlJob
|
||||
jobtype = job.UrlJob
|
||||
elif args.list_keywords:
|
||||
jobtype = jobs.KeywordJob
|
||||
jobtype = job.KeywordJob
|
||||
else:
|
||||
jobtype = jobs.DownloadJob
|
||||
jobtype = job.DownloadJob
|
||||
for url in args.urls:
|
||||
jobtype(url).run()
|
||||
except KeyboardInterrupt:
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import os
|
||||
import json
|
||||
import hashlib
|
||||
from . import config, extractor, downloader, text, output, exceptions
|
||||
from . import config, extractor, downloader, text, output, exception
|
||||
from .extractor.message import Message
|
||||
|
||||
class Job():
|
||||
@@ -18,7 +18,7 @@ class Job():
|
||||
def __init__(self, url):
|
||||
self.extractor = extractor.find(url)
|
||||
if self.extractor is None:
|
||||
raise exceptions.NoExtractorError(url)
|
||||
raise exception.NoExtractorError(url)
|
||||
|
||||
def run(self):
|
||||
"""Execute or run the job"""
|
||||
@@ -80,7 +80,7 @@ class DownloadJob(Job):
|
||||
for url in self.queue:
|
||||
try:
|
||||
DownloadJob(url).run()
|
||||
except exceptions.NoExtractorError:
|
||||
except exception.NoExtractorError:
|
||||
pass
|
||||
|
||||
def download(self, msg):
|
||||
Reference in New Issue
Block a user