1

所以我已经成功地text/html在 Google Drive 上抓取了文档的内容,但我想知道是否有一种方法可以在没有评论的情况下获取内容。我浏览了文档,我只能看到一种列出评论而不是删除评论的方法。

以下是从 Google Docs 返回的 HTML 示例(来自body标签内):

<p class="c4">
  <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam semper commodo orci, id pretium magna luctus sed. Sed</span>
  <sup><a href="#cmnt1" name="cmnt_ref1">[a]</a></sup>
  <span>&nbsp;elementum consequat erat in bibendum. Donec lobortis convallis urna, ac sodales quam cursus vel. Mauris nec augue eu ligula ultricies blandit. Aenean blandit bibendum volutpat. In gravida turpis sed turpis adipiscing tempus. Nullam ut nunc sed nunc adipiscing ve</span>
  <span>hicula ac vel tellus. Donec elit lacus, auctor a sodales viverra, viverra sed felis. Mauris ornare velit ac lacus placera</span>
  <sup><a href="#cmnt2" name="cmnt_ref2">[b]</a></sup>
  <span>t, sit amet tincidunt eros pellentesque. Nullam neque massa, sagittis ac lacinia eleifend, placerat at elit. Fusce ultrices vulputate congue. Nulla pellentesque elit vitae elit faucibus, sit amet dapibus nunc eleifend. Duis placerat sapien at nulla congue, quis commodo nisi tempor. Duis auctor nunc ut augue pretium suscipit.</span>
</p>
<p class="c1">
  <span></span>
</p>
<p class="c4">
  <span>Sed nec bibendum turpis, id pharetra est. Mauris et pretium nisi. Nullam non imperdiet sapien. Aliquam erat volutpat. Mauris rhoncus magna magna, vitae rutrum enim scelerisque ac. Aenean consequat euismod nibh, sed dignissim velit consequat vitae. Fusce vel placerat turpis. Sed ut dignissim risus. Etiam </span>
  <span>luctus tincidunt nunc id volutpat. Ut ac pharetra quam, nec imperdiet mauris. Fusce consectetur vitae est eget laoreet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Praesent sit am</span>
  <sup><a href="#cmnt3" name="cmnt_ref3">[c]</a></sup>
  <span>et arcu facilisis odio cursus pharetra ac vulputate lorem. Nullam pharetra viverra quam, a placerat purus convallis sollicitudin. Donec bibendum est ac libero sodales tempus vel vel lectus. Sed commodo bibendum sapien nec tincidunt.</span>
</p>
<p class="c1">
  <span></span>
</p>
<div class="c3">
  <p class="c0">
    <a href="#cmnt_ref1" name="cmnt1">[a]</a>
    <span>Ahmed Nuaman:</span>
  </p>
  <p class="c0">
    <span>Here's a comment</span>
  </p>
</div>
<div class="c3">
  <p class="c0">
    <a href="#cmnt_ref2" name="cmnt2">[b]</a>
    <span>Ahmed Nuaman:</span>
  </p>
  <p class="c0">
    <span>Here's another comment</span>
  </p>
</div>
<div class="c3">
  <p class="c0">
    <a href="#cmnt_ref3" name="cmnt3">[c]</a>
    <span>Ahmed Nuaman:</span>
  </p>
  <p class="c0">
    <span>Another further comment</span>
  </p>
</div>
4

1 回答 1

0

您使用哪个 URL 来获取 HTML 内容?我怀疑您使用的是方便的 URL 之一,而不是使用 exportLinks:text/html。

于 2013-09-15T06:34:38.500 回答