Downloading one note page with image content as HTML

久未见 提交于 2021-02-11 09:37:07

问题


When we get the page content as HTML using one note API Image sources doesn't seem to be working correctly. There is a $value at the end of the image source in HTML content. How do we handle this when the one note page has images?
Ex:

img width="649" height="587" src="https://www.onenote.com/api/v1.0/me/notes/resources/0-7dcd564dd9c2472c82451536349be691!1-AA1F36752D8FDBF!14716/$value" data-src-type="image/png" data-fullres-src="https://www.onenote.com/api/v1.0/me/notes/resources/0-7dcd564dd9c2472c82451536349be691!1-AA1F36752D8FDBF!14716/$value" data-fullres-src-type="image/png" />>


回答1:


Have you tried issuing a GET request to that URL (e.g. https://www.onenote.com/api/v1.0/me/notes/resources/0-7dcd564dd9c2472c82451536349be691!1-AA1F36752D8FDBF!14716/$value)? Don't forget to include the Authentication headers.




回答2:


Issue a GET request with the following format:

https://www.onenote.com/api/v1.0/me/notes/pages/*yourpageID*/content?preAuthenticated=true

Essentially, you just pass in the standard query with the argument preAuthenticated=true.



来源:https://stackoverflow.com/questions/35516875/downloading-one-note-page-with-image-content-as-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!