I\'m trying to scrape all the HTML elements of a page using requests & beautifulsoup. I\'m using ASIN (Amazon Standard Identification Number) to get the product details of a
try this:
import requests from bs4 import BeautifulSoup url = "http://www.amazon.com/dp/" + 'B004CNH98C' r = requests.get(url) r = r.text ##options #1 # print r.text soup = BeautifulSoup( r.encode("utf-8") , "html.parser") ### options 2 print(soup)