I want to scrape data from this website: https://playvalorant.com/en-us/news/game-updates/
from bs4 import BeautifulSoup
import requests
site_text = requests.get('https://playvalorant.com/en-us/news/game-updates/').text
soup = BeautifulSoup(site_text, 'lxml')
posts = soup.find_all('li', class_="ContentListing-module--contentListingItem--3GAoa")
for post in posts:
post_title = post.find(
'h3', class_="heading-05 bold ContentListingCard-module--title--1vIFy").text
post_title = post_title.lower()
if "patch notes" in post_title:
patch_ver = post_title.replace('valorant patch notes ', '')
print(f'Patch version: {patch_ver}')
print("")
But when I run it, nothing happens at all.
What I want to do is to see if the h3 includes the text "patch notes" and if so, check what version it is and go to https://playvalorant.com/en-us/news/game-updates/valorant-patch-notes-(patch-number)-(patch-number)/ (for example, if the text was "VALORANT Patch Notes 3213.07", then I want to go to https://playvalorant.com/en-us/news/game-updates/valorant-patch-notes-3213-07, and so on.)
I'm getting ahead of myself, but the point is, how can I get the text from this website, and then print it out?