switch to IsUrlValid

This commit is contained in:
cynthia 2025-04-03 21:53:37 +00:00
parent 0a0233a8a2
commit 08e2b5ab20

View file

@ -5,7 +5,7 @@ import urllib.parse
import argparse
import os
import re
from utils import print_colors
from utils import print_colors, IsUrlValid
parser = argparse.ArgumentParser(
prog='Lantern crawler',
@ -99,9 +99,7 @@ def extract_urls_html(url, text):
print_colors(f'[D] Joined URL: {joined_url}')
# Check if the URL is a .onion link or not even a web link
if jurl_parsed.scheme != 'http':
continue
if not jurl_parsed.hostname.endswith('.onion'):
if not IsUrlValid(joined_url):
continue
print_colors(f'[+] Found url: {joined_url}')