From 8e34d94acd629016acd924631154687350d481bd Mon Sep 17 00:00:00 2001 From: master Date: Sat, 30 Dec 2023 23:17:41 -0500 Subject: [PATCH] Fix browser agent --- main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.py b/main.py index 01164fb..c8dd9fa 100644 --- a/main.py +++ b/main.py @@ -3,7 +3,6 @@ from bs4 import BeautifulSoup from urllib.parse import urlparse, urlunparse import pandas as pd -headers = {'User-Agent': 'myprogram/1.0'} def scrape_headings(url): try: # Check if the URL has a scheme (http/https), and add one if missing @@ -42,7 +41,7 @@ def scrape_headings(url): def main(): - url = input("Enter the URL: ") + url = input("Enter the URL: ")ls scrape_headings(url) # df = pd.DataFrame(scrape_headings(url)) search_again = input("Do you want to search again? y/n:").lower()