Instead of using the HTML tag since it's an encoded class, we need to retrieve more data from the network call to get additional information for each video.
We need to scrap the meta ads library using python playwright or beautiful soup.
-
Install the libraies:
pip install pandas playwright -
Run the code:
py scrape_ads.py