1
我怎麼會選擇所有的標題在此頁面如何在此html中選擇特定標籤?
http://bulletin.columbia.edu/columbia-college/departments-instruction/african-american-studies/#coursestext
例如:我試圖讓所有類似這樣的臺詞:
AFAS C1001 Introduction to African-American Studies. 3 points.
main_page通過所有的迭代從這裏學校上課,所以我可以抓住所有的標題像上面:
http://bulletin.columbia.edu/columbia-college/departments-instruction/
for page in main_page:
sub_abbrev = page.find("div", {"class": "courseblock"})
我有這樣的代碼,但我無法弄清楚到底如何選擇所有的(」第一個孩子的'強')標籤。 使用最新的蟒蛇和美麗的湯4網絡刮。 如果還有其他需要的東西,請立即行動。 謝謝
在OPS例子,他有兩點之間的空間。你會如何保持這一點?這就是數據在網站上的顯示方式,甚至認爲它並不在源代碼中。 –
@double_j很好的發現!在答案中解釋。謝謝! – alecxe