Body: <p>I only want to use a specific "&lt; d i v>" of the htmls to create epub, say, all the other part is useless.</p>
  
  <p>Because each of the htmls is about 20k, and there are a lot of junk informations, scripts, ads, ... </p>
  
  <p>All I need the "main-content" div:</p>
  
  <pre><code>&lt;html&gt;
  ....
  &lt;div id="main-content"&gt;
  ....
  ....
  ....
  &lt;/div&gt;
  ...
  
  &lt;/html&gt;
  </code></pre>
  
  <p>I know its xpath is :</p>
  
  <pre><code>//*[@id="main-content"] 
  </code></pre>
  
  <p>How to use it in calibre or ebook-convert?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-28T13:44:01.577Z
Comments.Text: You need to show some understanding of html to understand what has to happen here. Try editing in calibre editor to see if their search is enough.
Comments.UserDisplayName: mmmmmm
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-02T16:28:39.067Z
Comments.Text: @Mark Thanks for looking into it. I update the post.
Comments.UserDisplayName: camino
Tags: <calibre>
Title: how to extract specific tag using calibre
UserDisplayName: camino
ThreadText: # how to extract specific tag using calibre
  
  (Asked by: username_0 on 2019-02-28)
  
  I only want to use a specific "< d i v>" of the htmls to create epub, say, all the other part is useless.
  Because each of the htmls is about 20k, and there are a lot of junk informations, scripts, ads, ... 
  All I need the "main-content" div:
  
  ....
  
  ....
  ....
  ....
  
  ...
  
  
  
  I know its xpath is :
  //*[@id="main-content"] 
  
  How to use it in calibre or ebook-convert?
  
  **Tags:** calibre
  
  > **Comments:**
  > **username_1**: You need to show some understanding of html to understand what has to happen here. Try editing in calibre editor to see if their search is enough.  
  > **username_0**: @Mark Thanks for looking into it. I update the post.  
  
  ---
  
  ## 0 answers
  
  