0
<div class="product-header-wrapper">
    <div class="prices-container">
        <p class="price price--large">£250.00</p>
    </div>
</div>

Here is my code

import requests
from bs4 import BeautifulSoup

request = requests.get("https://www.johnlewis.com/herman-miller-classic-aeron-office-chair/p230630306")
content = request.content
soup = BeautifulSoup(content, "html.parser")
element = soup.findAll(classmethod = 'price price--large')
print(element.text)


print(request.content)"

I am looking to print the price in my code.

hoefling
  • 59,418
  • 12
  • 147
  • 194
Arsenii
  • 109
  • 1
  • 4
  • 8
  • 1
    Possible duplicate of [How to find elements by class](https://stackoverflow.com/questions/5041008/how-to-find-elements-by-class) – Syed Waqas Bukhary Dec 13 '17 at 18:33
  • I keep getting 'NoneType' object has no attribute text. – Arsenii Dec 13 '17 at 18:33
  • no luck Waqas Bukhary tried all samples with no luck. Should I be going up a level on the class? Not sure why it would not take the class since it happens to be the only one on the page. – Arsenii Dec 13 '17 at 18:39

0 Answers0