Spaces:
Sleeping
Sleeping
pryanshusharma
commited on
Update degruyterscrapper.py
Browse files- degruyterscrapper.py +2 -0
degruyterscrapper.py
CHANGED
@@ -39,6 +39,8 @@ def getLinks(url: str) -> list:
|
|
39 |
output.append(f"https://www.degruyter.com{link}")
|
40 |
except:
|
41 |
links = fullPage.findAll("a", {"class" : "issueContentsArticleLink linkHoverDark d-inline-block"})
|
|
|
|
|
42 |
for link in links:
|
43 |
output.append(f"https://www.degruyter.com{link.get('href')}")
|
44 |
return output
|
|
|
39 |
output.append(f"https://www.degruyter.com{link}")
|
40 |
except:
|
41 |
links = fullPage.findAll("a", {"class" : "issueContentsArticleLink linkHoverDark d-inline-block"})
|
42 |
+
if len(links) < 1:
|
43 |
+
raise AttributeError("Not found")
|
44 |
for link in links:
|
45 |
output.append(f"https://www.degruyter.com{link.get('href')}")
|
46 |
return output
|