Skip to content

Commit 0eefbe0

Browse files
authored
Merge pull request #303 from seleniumbase/invalid-urls-fix
Fix method that finds all links on a web page
2 parents 592dfba + 6cdafe1 commit 0eefbe0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

seleniumbase/fixtures/page_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ def get_domain_url(url):
1313
Into this:
1414
https://blog.xkcd.com
1515
"""
16+
if "http://" not in url and "https://" not in url:
17+
return url
1618
url_header = url.split('://')[0]
1719
simple_url = url.split('://')[1]
1820
base_url = simple_url.split('/')[0]
@@ -71,6 +73,8 @@ def _get_unique_links(page_url, soup):
7173
Includes:
7274
"a"->"href", "img"->"src", "link"->"href", and "script"->"src" links.
7375
"""
76+
if "http://" not in page_url and "https://" not in page_url:
77+
return []
7478
prefix = 'http:'
7579
if page_url.startswith('https:'):
7680
prefix = 'https:'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
setup(
1919
name='seleniumbase',
20-
version='1.22.0',
20+
version='1.22.1',
2121
description='Reliable Browser Automation & Testing Framework',
2222
long_description=long_description,
2323
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)