df = pd.read_excel('Input.xlsx', nrows=114) # Define a function to extract the URL and URL_ID from a row def extract_url_id(row): return row['URL'], row['URL_ID'] # Apply the function to each row and extract the URL and URL_ID urls, url_ids = zip(*df.apply(extract_url_id, axis=1)) print(urls) print(url_ids) # Extract the URLs from the DataFrame urls = df['URL'].tolist() # Iterate over the URLs for url in urls: # Make a request to the URL r = requests.get(url) # Extract the HTML from the response html = r.text
Quote:error typically indicates that there was an issue establishing a connection
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)