title_body: how to extract specific tag using calibre I only want to use a specific "&lt; 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:
  
  &lt;html&gt;
  ....
  &lt;div id="main-content"&gt;
  ....
  ....
  ....
  &lt;/div&gt;
  ...
  
  &lt;/html&gt;
  
  
  I know its xpath is :
  
  //*[@id="main-content"] 
  
  
  How to use it in calibre or ebook-convert?
upvoted_answer: AFAIK, this can't be done automatically with Calibre. However, if it's possible to download parts of a website with a custom Recipe.
  
  If you're familiar with Python, you could also use BeautifulSoup to scrape websites. 
  
  For more information, see How to scrape websites with Python and BeautifulSoup.