Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 10-10-2013, 06:07 PM   #1
mr.w0lf
n00b
mr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with others
 
Posts: 58
Karma: 2802
Join Date: Jan 2012
Device: Kindle Touch
parse_index() question

Hi, I am using parse_index to build my recipe, problem is that site where i getting everything gives out not a valid HTML page, instead just the content of the article i want to read (so no html/head/body tag, just the tags included in the article).

Calibre is working nice, except that gives me back a file with no content inside.. maybe is because of the strange situation i have described? solutions? do i have to do something like putting an article template before write the temp file (see spoiler)?

Spoiler:

header = '<html><head><title>bla bla bla</title></head><body>'
footer = '</body></html>'
foo.write(header+article+footer)


mr.w0lf is offline   Reply With Quote
Old 10-10-2013, 09:44 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,870
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can implement get_obfuscated_article() in your recipe to do that.
kovidgoyal is offline   Reply With Quote
Old 10-11-2013, 05:30 AM   #3
mr.w0lf
n00b
mr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with others
 
Posts: 58
Karma: 2802
Join Date: Jan 2012
Device: Kindle Touch
thank you, solved.. now i'll post an other topic ofr an other issue
mr.w0lf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Use parse_index to parse XML? surf Recipes 0 02-10-2013 04:36 AM
Questions about skipping re-downloading and parse_index browse to next page hiperlink Recipes 5 04-28-2011 09:49 AM
Problem with Article Date in parse_index spedinfargo Recipes 5 02-19-2011 07:12 PM
Article Dates with parse_index EnergyLens Calibre 6 04-21-2010 10:13 PM
Omitting description an author in parse_index nickredding Calibre 0 12-31-2009 04:19 PM


All times are GMT -4. The time now is 12:25 AM.


MobileRead.com is a privately owned, operated and funded community.