Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-11-2010, 08:27 PM   #1
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
New Recipe: Rolling Stones

I don't think anyone has done this one. If they have then ignore this. I didn't see it in the recipe section.
Let me know if you see any formatting issues or anything else.
Attached Files
File Type: rar rstones.rar (1.8 KB, 108 views)
TonytheBookworm is offline   Reply With Quote
Old 10-11-2010, 09:20 PM   #2
aroland
Junior Member
aroland began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
thanks! I was just thinking about doing this myself!
aroland is offline   Reply With Quote
 
Advertisement
Old 10-12-2010, 11:44 AM   #3
chainanim
Junior Member
chainanim began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2010
Device: kindle 2
Dear Tony,

Thanks for this. Unfortunately I get the following error message while trying to load it into Calibre.

ERROR: Invalid input: <p>Could not create recipe. Error:<br>unexpected indent (recipe18.py, line 72)
chainanim is offline   Reply With Quote
Old 10-12-2010, 06:52 PM   #4
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Quote:
Originally Posted by chainanim View Post
Dear Tony,

Thanks for this. Unfortunately I get the following error message while trying to load it into Calibre.

ERROR: Invalid input: <p>Could not create recipe. Error:<br>unexpected indent (recipe18.py, line 72)
Yeah thanks, sorry about that I had added some comments to the code and it messed up the indents. anyway this should work.

test and let me know please.
Attached Files
File Type: rar rstones.rar (1.8 KB, 106 views)
TonytheBookworm is offline   Reply With Quote
Old 10-12-2010, 07:08 PM   #5
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
I see in a future release of this recipe the need to extract all the Video:.... Links. If someone else finds the time (I am swamped with work but just chiming in when i'm free), please feel free to modify the code.
The basic thing that needs to be done is this.
Spoiler:

Code:
def preprocess_html(self, soup) :
      '''
         need to find the structure of the links and what their tags are
         apply them to the findAll
      ''''
      weblinks = soup.findAll(['PUT THE TAGS HERE SEPERATED BY COMMA'])
      if weblinks is not None:
            for link in weblinks:
                if re.search('(Video)(:)',str(link)):
                  
                  link.parent.extract()
        return soup
TonytheBookworm is offline   Reply With Quote
Old 10-14-2010, 02:32 PM   #6
chainanim
Junior Member
chainanim began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2010
Device: kindle 2
This works fine now. Thank you.
chainanim is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Seriously thoughtful Guide Stones. nohmi2 Lounge 45 09-10-2010 06:45 PM
I know it's only rolling rock ardeegee Lounge 1 07-12-2010 12:25 AM
Rolling Stone New Web Model Fat Abe News 2 04-18-2010 12:00 PM
Recipe Help hellonewman Calibre 1 01-23-2010 04:45 AM
Rolling Thunder - John Varley Donnageddon Reading Recommendations 4 07-01-2008 03:03 PM


All times are GMT -4. The time now is 04:51 PM.


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