使用Python从学生医生网络(SDN)中获取面试问题

2024-06-02 10:21:38 发布

您现在位置:Python中文网/ 问答频道 /正文

我是一个python新手,我正在开发一个从学生医生网络(Student Doctor Network,一个为医学院预科学生提供的流行论坛)中获取医学院面试问题的工具。我不确定创建一个随机打印任何特定学校面试问题的程序的最简单方法是什么

带有问题的示例页面:https://www.studentdoctor.net/schools/school/emory/survey/26/emory-university-school-of-medicine/1

我不确定BeautifulSoup是否是一条正确的道路,但如果您能提供帮助或指导,为我的课程找出最佳的面试问题,我将不胜感激。谢谢大家!


Tags: 工具程序网络network论坛student学生学校
1条回答
网友
1楼 · 发布于 2024-06-02 10:21:38

您可以使用以下示例从页面中提取问题:

import requests
from bs4 import BeautifulSoup


url = "https://www.studentdoctor.net/schools/school/emory/survey/26/emory-university-school-of-medicine/1"

soup = BeautifulSoup(requests.get(url).content, "html.parser")
for question in soup.select("h3"):
    q = question.get_text(strip=True).replace("\n", " ")
    if q.endswith("?"):
        print(q)

印刷品:

How to tell strength of clinical years?
How did the interview impress you?
What was the stress level of the interview?
How you think you did?
How do you rank this school among ALL other schools?
How long was the interview?
Where did the interview take place?
What was the style of the interview?
What type of interview was it?
How many people interviewed you?
What is one of the specific questions they asked you (question 1)?
What is one of the specific questions they asked you (question 2)?
What is one of the specific questions they asked you (question 3)?
What was the most interesting question?
What was the most difficult question?
How did you prepare for the interview?
What impressed you positively?
What impressed you negatively?
What did you wish you had known ahead of time?
What are your general comments?
Who was the tour given by?
How did the tourguide seem?
How do you rank the facilities?
What is your in-state status?
What was your total time spent traveling?
What was your primary mode of travel?
About how much did you spend on room, food, and travel?
What airport did you use?
Where did you stay?
What is the name of the hotel you stayed in?
Would you recommend the hotel?
How do you rank this school among other schools to which you've applied?
What is your ranking of this school's location?
What is your ranking of this area's cultural life?
How is the responsiveness of the admissions office?
How is the friendliness of the admissions office?
How eco-friendly are the school's application materials and interview process?
What are your suggestions for the admissions office?

相关问题 更多 >