Skip to content

Commit be355be

Browse files
authored
Merge pull request #29 from MikeMeliz/28-error-errno-2-no-such-file-or-directory
BugFix
2 parents c3df939 + c465b0e commit be355be

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

torcrawl.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def main():
183183
out_path = folder(extract_domain(website), args.verbose)
184184

185185
# Parse arguments to variables else initiate variables.
186-
input_file = args.input if args.input else (out_path + '/' + now + '_links.txt')
186+
input_file = args.input if args.input else ''
187187
output_file = args.output if args.output else ''
188188
c_depth = args.cdepth if args.cdepth else 0
189189
c_pause = args.cpause if args.cpause else 1
@@ -203,6 +203,9 @@ def main():
203203
args.verbose)
204204
lst = crawler.crawl()
205205

206+
if args.input == None:
207+
input_file = out_path + '/' + now + '_links.txt'
208+
206209
with open(input_file, 'w+', encoding='UTF-8') as file:
207210
for item in lst:
208211
file.write(f"{item}\n")

0 commit comments

Comments
 (0)