擅长:python、mysql、java
<p>只需将<a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/" rel="nofollow noreferrer">^{<cd1>}</a>与<a href="http://docs.python-requests.org/en/master/" rel="nofollow noreferrer">^{<cd2>}</a>一起使用。在</p>
<pre><code>from bs4 import BeautifulSoup
import requests
r = requests.get('https://news.google.com/news/rss')
soup = BeautifulSoup(r.text, 'xml')
news_list = soup.find_all('item')
# do whatever you need with news_list
</code></pre>