1
0
Fork 0
mirror of https://github.com/kemayo/leech synced 2025-12-06 16:33:16 +01:00

Slightly more info about what happened

This commit is contained in:
David Lynch 2013-12-24 02:47:14 -06:00
parent 136c31ef22
commit 186daa19fb

View file

@ -29,6 +29,8 @@ def leech(url, filename=None):
return
story = site.extract(url, fetch)
if not story:
return
metadata = {
'title': story['title'],
@ -43,6 +45,8 @@ def leech(url, filename=None):
epub.make_epub(filename, html, metadata)
return filename
_sites = []
def _get_site(url):
@ -66,5 +70,8 @@ if __name__ == '__main__':
parser.add_argument('--filename', help="output filename (the title is used if this isn't provided)")
args = parser.parse_args()
leech(args.url, filename=args.filename)
pass
filename = leech(args.url, filename=args.filename)
if filename:
print("File created:", filename)
else:
print("A problem occurred.")