如何输入URL并自动将数据从已定义的类中提取到数据库中[关闭]

如何输入URL并自动将数据从已定义的类中提取到数据库中[关闭]

问题描述:

I would like to record course information (Course Title, Summary, Price, etc...) from a course page on Udemy.com and push the information to a database. (For example: https://www.udemy.com/davinciediting/)

If possible I would like to just be able to write a script so that I can paste a Course URL and have the information fetched and recorded into a database automatically.

All the course pages have the same classes the the script would be looking for data contained in a specified class for each URL.

我想从课程页面记录课程信息(课程名称,摘要,价格等) 在Udemy.com上将信息推送到数据库。 (例如: https://www.udemy.com/davinciediting/ ) p >

如果可能的话,我希望能够编写一个脚本,以便我可以粘贴一个课程URL并将信息提取并自动记录到数据库中。 p>

所有课程页面都具有相同的类,脚本将在每个URL的指定类中查找数据。 p> div>

You can scrape the webpages you want with Python using the requests and BeautifulSoup.

And then you can add the data to a database, you may use an ORM like SQLAlchemy or peewee.