I am scraping the next web page: https://www.udemy.com/course/the-modern-cpp-20-masterclass/ I got 2 params that I cant access to. The first one is the price and the second is the number of the articles. For example, in the course I sent the link, there are 4 articles. You can find it in the right side under 'this course includes'. Thank you for your help !
My code for the price that doesnt work is:
import time
import os
import bs4
from bs4 import BeautifulSoup
import pandas as pd
import scipy as sc
import numpy as np
import requests
url = "https://www.udemy.com/course/the-modern-cpp-20-masterclass/"
page = requests.get(url)
soup = BeautifulSoup(page.content,'html.parser')
course_price = soup.find('div', {"class" : 'sidebar-container-position-manager'})
children = course_price.findChildren("div" , recursive=False)
For the number of articles, when I tried it, it returned me: 4 articles
When I tried to extract the 4 articles, it just returned an empty string.
Thanks for anyone who try helping !
source https://stackoverflow.com/questions/72332310/scraping-a-udemy-course-with-beautifoulsoup
Comments
Post a Comment