问题
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