【发布时间】:2019-02-25 18:01:36
【问题描述】:
我想从网站导入成绩单,但只分析其中一半的数据。 我已经导入了 URL,我想计算文本中唯一单词的总数,但仅来自抄本“The Rental of the Manor of Mayfield, 1545”的行。有谁知道我可以使用什么代码来做到这一点?我不知道如何从 URL 中计算单词,而只能从某个部分计算单词。 到目前为止,我已经写了:
import requests
source = 'http://www.myjacobfamily.com/historical%20manuscripts/mayfield%201.htm'
r = requests.get(source)
print(r.text)
【问题讨论】:
-
我不明白你所说的“半页”是什么意思。能否请您详细说明