我一直在尝试从网页中抓取数据以进行数据分析项目,并且成功地从单个页面中获取数据。
import requests
from bs4 import BeautifulSoup
import concurrent.futures
from urllib.parse import urlencode
from scraper_api import ScraperAPIClient
client = ScraperAPIClient('key')
results = client.get(url = "https://www.essex.ac.uk/course-search?query=&f.Level%7CcourseLevel=Undergraduate").text
print(results)
对于来自网站“https://www.essex.ac.uk/course-search?query=&f.Level%7CcourseLevel=Undergraduate”的示例,我需要在每个课程中导航并从该页面获取一个称为持续时间的数据.