CP2020-40923218

  • Home
    • Site Map
    • reveal
    • blog
  • 首頁
  • 關於更新
    • 十月份更新
    • 十一月更新
    • 十二月更新
    • 一月份更新
  • 心得
  • 課程內容(HW1)
    • Customer Relations
    • Overview
    • Operational Procedures
      • Customer Service Key Principles
    • Effective Listening
      • Listening skills
    • Taking Ownership
      • Apologizing When Appropriate
      • Show Empathy
    • Remain Courteous and Professional
      • Timeliness
      • Keeping the Customer Informed
    • Problem Resolution and Follow-Up
    • Proper Treatment of a Customer’s Property
    • Putting it All Together
  • 課程內容(HW2)
    • 作業之一(分組數列)
    • 作業之二(是否有加退選)
    • 作業之三()
  • 課程內容(HW3)
    • 19題
    • 25題
      • 猜數字測試
    • 26題
  • 網頁來自Github
    • 運作原理
課程內容(HW3) << Previous Next >> 25題

19題

(完成度90%)

import requests
from bs4 import BeautifulSoup

url = "http://www.vanityfair.com/society/2014/06/monica-lewinsky-humiliation-culture"

r = requests.get(url)
soup = BeautifulSoup(r.text)
文本 = soup.select('p,title')

for t in 文本:
    print(t.text)

心得:

我這邊來說說我如何學這串程式,我一開始看不懂這串程式,我一行一行慢慢看,並且翻譯,我也在想有沒有別的方法可以寫這串,所以我Google後吸收了一下,打出了上面這串程式,這串程式中還是有一些文檔跑不出來,我還在嘗試解決。

備註:

用kaggle跑不出結果,用小白窗才能跑出東西

結果:


課程內容(HW3) << Previous Next >> 25題

Copyright © All rights reserved | This template is made with by Colorlib