pryanshusharma commited on
Commit
a73bd7d
·
verified ·
1 Parent(s): 95acdc2

Update degruyterscrapper.py

Browse files
Files changed (1) hide show
  1. 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