fork download
  1. # your code goes here
  2. from urllib.request import urlopen
  3. from bs4 import BeautifulSoup
  4.  
  5. html = urlopen('https://t...content-available-to-author-only...o.com/%E5%87%BA%E5%9C%8B%E7%8E%A9%E7%9A%84%E4%BA%BA-%E8%A3%9C%E5%8A%A9%E5%9C%8B%E5%85%A7%E7%8E%A9%E7%9A%84%E4%BA%BA-%E8%A7%80%E5%85%89%E7%99%BC%E5%B1%95%E5%9F%BA%E9%87%91%E8%B6%85%E6%94%AF27%E5%84%84-230627909.html')
  6. bs = BeautifulSoup(html, 'html.parser')
  7.  
  8.  
  9.  
  10. for p in ps:
  11. print(p.get_text())
  12.  
  13. ps = bs.find_all('p')
  14. for p in ps:
  15. for c in p.children:
  16. if c.name == None:
  17. print(c)
Runtime error #stdin #stdout #stderr 0.11s 23760KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 3, in <module>
ModuleNotFoundError: No module named 'bs4'