【发布时间】:2019-05-19 19:25:30
【问题描述】:
我正在尝试使用 selenium 和 python 2.7 抓取网站中的数据。这是我要抓取的数据中的代码
<textarea>let, either, and, have, rather, because, your, with, other, that, neither, since, however, its, will, some, own, than, should, wants, they, got, may, what, least, else, cannot, like, whom, which, who, why, his, these, been, had, the, all, likely, their, must, our</textarea>
我需要插入所有单词以列出并对其进行排序。现在这是我的进步
wordlist = []
data = browser.find_element_by_tag_name("textarea")
words = data.get_attribute()
wordlist.append(words)
print words
print wordlist.sort()
任何帮助或线索都会对我有用
【问题讨论】:
-
您的问题能具体一点吗?例如,是否发生了意外错误?
-
如果我的问题不够清楚,我很抱歉。当我尝试运行该代码时打印它工作正常的单词但是当我在排序后尝试打印单词列表时,输出为无
标签: python web-scraping selenium-chromedriver