Skip to content

Instantly share code, notes, and snippets.

@letroot
Created March 2, 2018 08:22
Show Gist options
  • Save letroot/2ca6e04b853cb4f0e1f6dc78f01f706a to your computer and use it in GitHub Desktop.
Save letroot/2ca6e04b853cb4f0e1f6dc78f01f706a to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup
ROOT_URL = "https://talendexpert.com/page/{pg_num}"
# for page in range(2,193):
# html_doc = requests.get(ROOT_URL.format(pg_num=page)).text
# soup = BeautifulSoup(html_doc, 'html.parser')
# for link in soup.findAll("h1", attrs={'class':"product_title"}):
# print (link.a.name)
html_doc = requests.get(ROOT_URL.format(pg_num='2')).text
soup = BeautifulSoup(html_doc, 'html.parser')
for link in soup.findAll("h1", attrs={'class':"product_title"}):
print (link.a.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment