@@ -52,20 +52,26 @@ def check_for_externals(url, data_sep="-" * 30, **kwargs):
52
52
if len (interesting ) > 0 :
53
53
lib .core .settings .create_tree (full_url , list (interesting ))
54
54
else :
55
+ question_msg = "nothing interesting found in robots.txt would you like to display the entire page"
55
56
if not batch :
56
57
to_display = lib .core .settings .prompt (
57
- "nothing interesting found in robots.txt would you like to display the entire page" , opts = "yN"
58
+ question_msg , opts = "yN"
58
59
)
59
- if to_display .lower ().startswith ("y" ):
60
- print (
61
- "{}\n {}\n {}" .format (
62
- data_sep , data , data_sep
63
- )
60
+ else :
61
+ to_display = lib .core .settings .prompt (
62
+ question_msg , opts = "yN" , default = "n"
63
+ )
64
+
65
+ if to_display .lower ().startswith ("y" ):
66
+ print (
67
+ "{}\n {}\n {}" .format (
68
+ data_sep , data , data_sep
64
69
)
70
+ )
65
71
lib .core .settings .logger .info (lib .core .settings .set_color (
66
72
"robots.txt page will be saved into a file..." , level = 25
67
73
))
68
- return lib .core .settings .write_to_log_file (data , lib .core .settings .ROBOTS_PAGE_PATH , "robots-{} .log" .format (url ))
74
+ return lib .core .settings .write_to_log_file (data , lib .core .settings .ROBOTS_PAGE_PATH , "{}-robots_text .log" .format (url ))
69
75
elif sitemap :
70
76
lib .core .settings .logger .info (lib .core .settings .set_color (
71
77
"found a sitemap, saving to file..." , level = 25
0 commit comments