cyberandy commited on
Commit
09ac8aa
·
verified ·
1 Parent(s): cfaa3db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -14,8 +14,11 @@ def process_url(url, *args):
14
  return "", "Please enter a URL"
15
 
16
  try:
 
 
 
17
  output_file = token_hex(6)
18
- adv.crawl(url, f"{output_file}.jsonl")
19
  crawl_df = pd.read_json(f"{output_file}.jsonl", lines=True)
20
 
21
  all_links = []
 
14
  return "", "Please enter a URL"
15
 
16
  try:
17
+ if not url.startswith(('http://', 'https://')):
18
+ url = 'https://' + url.strip('/')
19
+
20
  output_file = token_hex(6)
21
+ adv.crawl(url, f"{output_file}.jsonl", follow_links=True)
22
  crawl_df = pd.read_json(f"{output_file}.jsonl", lines=True)
23
 
24
  all_links = []