I am very very new to python and am checking whether HTML links are active. I have a csv file with 1000 website HTML links. I can verify a single link using:
from django.core.validators import URLValidator validate = URLValidator() try: validate(www.example.com) print("String is a valid URL") except ValidationError as exception: print("String is not valid URL")
However, I do not know enough python to do a loop of all 1000 links. I can import the csv file, but am not sure what to do next.
I have tried:
import pandas as pd xbrllink= pd.read_csv('WEB.csv', encoding='iso-8859-1') url = xbrllink['XBRL_LINK'] validate(url)
But I know I am missing a step. Sorry, I am just learning python. Any help would be greatly appreciated.