Skip to content

Instantly share code, notes, and snippets.

@jonathanoheix
Created December 11, 2018 14:55
Show Gist options
  • Save jonathanoheix/3b9b09df00338f46c3ab2a50e80c821d to your computer and use it in GitHub Desktop.
Save jonathanoheix/3b9b09df00338f46c3ab2a50e80c821d to your computer and use it in GitHub Desktop.
def getBooksURLs(url):
soup = getAndParseURL(url)
# remove the index.html part of the base url before returning the results
return(["/".join(url.split("/")[:-1]) + "/" + x.div.a.get('href') for x in soup.findAll("article", class_ = "product_pod")])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment