我正在尝试从evernote“共享笔记本”获取数据。 例如,从这个开始:https://www.evernote.com/pub/missrspink/evernoteexamples#st=p&n=56b67555-158e-4d10-96e2-3b2c57ee372c
我试着用靓汤:
url = 'https://www.evernote.com/pub/missrspink/evernoteexamples#st=p&n=56b67555-158e-4d10-96e2-3b2c57ee372c'
r = requests.get(url)
bs = BeautifulSoup(r.text, 'html.parser')
bs
结果不包含来自笔记本的任何文本信息,只有一些代码。在
我还看到了使用selenium和通过XPath查找元素的建议。 例如,我想找到这张便条的标题-“第3学期第2周”。在googlechrome中,我发现它的XPath是'/html/body/div[1]/div[1]/b/span/u/b'。 所以我试了一下:
^{pr2}$但它也没用,结果是“无动于衷”异常:。。。'. 在
我是python的新手,尤其是语法分析,所以我很乐意接受任何帮助。 我使用的是python3.6.2和jupiter笔记本。在
提前谢谢。在
与Evernote接口的最简单方法是使用它们的official Python API。在
在配置了API密钥并可以进行连接之后,您就可以下载和参考笔记和笔记本了。在
Evernote注释使用自己的模板语言ENML(Evernote标记语言),它是HTML的一个子集。您将能够使用beauthoulsoup4解析ENML并提取您要查找的元素。在
如果您试图针对本地安装(而不是他们的web应用程序)提取信息,您也可以从可执行文件中获取所需的信息。请参阅本地安装的how to pass arguments以提取数据。为此,您需要使用Python3^{} 模块。在
但是
如果您想使用selenium,这将帮助您开始:
相关问题 更多 >
编程相关推荐