<jupyter_start><jupyter_text>Selecting and Downloading 5000 of Phishing URLs and 5000 of Bnigan URLs*   In here, we collect Phishing URLs from http://data.phishtank.com/data/online-valid.csv and  select randomly 5000 URLs and save in to phishing.csv file*   Also, we collect Benigan URLs from https://www.unb.ca/cic/datasets/url-2016.html and  select randomly 5000 URLs from Benign_list_big_final.csv file  and save in to Benigan.csv file<jupyter_code>#importing required packages for this Notebook
import pandas as pd<jupyter_output><empty_output><jupyter_text>1. Selecting and Creating Phishing URLs<jupyter_code>data0 = pd.read_csv("CSV Files/1-valid_Phishing.csv")
data0.head() 
data0.shape
phishurl = data0.sample(n = 5000, random_state = 12).copy()
phishurl = phishurl["url"]
phishurl = phishurl.reset_index(drop=True)
phishurl.head()
# Storing the extracted legitimate URLs fatures to csv file
phishurl.to_csv('CSV Files/3-phishurl.csv', index= False)<jupyter_output><empty_output><jupyter_text>1. Selecting and Creating Benigan URLs<jupyter_code>data1 = pd.read_csv("CSV Files/2-valid_Benign.csv")
data1.columns = ['URLs']
data1.head()
#Collecting 5,000 Legitimate URLs randomly
legiurl = data1.sample(n = 5000, random_state = 12).copy()
legiurl = legiurl.reset_index(drop=True)
legiurl.shape
# Storing the extracted legitimate URLs fatures to csv file
legiurl.to_csv('CSV Files/4-beniganurl.csv', index= False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1028295376121463, 'fraction_numerical': 0.03450655624568668, 'mean_word_length': 6.213930348258707, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '59106', 'license': 'MIT', 'n_tokens_mistral': 553, 'n_tokens_neox': 498, 'n_words': 129, 'path': 'Constructing_ML_Model/.ipynb_checkpoints/1_Creating_URL-checkpoint.ipynb', 'repo_name': 'Hansajith98/Trawling-Chrome-Extention', 'size': '1449'}