Created
March 2, 2018 08:22
-
-
Save letroot/2ca6e04b853cb4f0e1f6dc78f01f706a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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