Python Beautifulsoup get text under tag

  beautifulsoup, python

I am trying to get all links, titles & dates in a specific month, like March in the website, I use beatifulsoup to do:

from bs4 import BeautifulSoup
import requests

html_link='https://www.pds.com.ph/index.html%3Fpage_id=3261.html'
html = requests.get(html_link).text
soup = BeautifulSoup(html, 'html.parser')
for link in soup.find_all('td'):
   #Text contains 'March'
   #Get the link title & link &date

New to Beautifulsoup, used to use selenium xpath: "//td[contains(text(),'Mar'), but no idea with Beautifulsoup lib, could anyone please help?

Many thanks!

Source: Python Questions

LEAVE A COMMENT