Skip to content

Commit ffae454

Browse files
committed
,py
1 parent 87d8e4d commit ffae454

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

automaticwebsiteurlscraper.py/webUrlscraper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
Url = input("Enter your Urllink")
1414
try :
1515
# trying to access the page
16-
page = Request(Url, headers={'User-Agent':'Mozilla/5.0'})
16+
page = Request(Url, headers={'User-Agent': 'Mozilla/5.0'})
1717
page = urlopen(page, context=ctx).read()
1818
# Using beautifulsoup to read the contents of the page
1919
soup = BeautifulSoup(page, 'html.parser')
2020
# finding all the link headers
2121
links = soup.findAll('a')
2222
if(links is not None) :
23-
finalLinks = [ ]
23+
finalLinks = []
2424
# getting actual site links from the header a
2525
for link in links :
2626
if 'href' in str(link) :

0 commit comments

Comments
 (0)