I am trying to parse the HTML on this website.
I would like to get the text from all these span
elements with class = "post-subject"
Examples:
<span class="post-subject">Set of 20 moving boxes (20009 or 20011)</span>
<span class="post-subject">Firestick/Old xbox games</span>
When I run my code below, soup.find()
returns None
. I'm not sure what's going on?
import requests
from bs4 import BeautifulSoup
page = requests.get('https://trashnothing.com/washington-dc-freecycle?page=1')
soup = BeautifulSoup(page.text, 'html.parser')
soup.find('span', {'class': 'post-subject'})