05-24-2011, 04:11 PM | #1 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Recipe for Cypresse (need help)
I am trying to edit the "Cyberpresse" recipe (authored by balok and Sujata Raman) to remove the text in the red rectangle which appears at the end of every article:
I have succeeded chosing my preferred feeds and in removing "publicité" by adding the class 'pub' to the 'div' removed_tags (modified recipe): But I don't know how to remove the "Parta"and "Tweet" (sample source html showing the end of an article): Your help would be much appeciated. |
06-01-2011, 04:03 PM | #2 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
I solved my own problem! I removed table entries "td" using "remove_tags".
Here is the edited recipe: Spoiler:
It looks ok, the "parta"and "tweet" are gone now but I don't understand if I could have broken anything else in the recipe. |
Advert | |
|
06-01-2011, 04:08 PM | #3 |
creator of calibre
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Removing td will remove everything from every table everywhere. If any article contains a table in its contents, that table will be removed.
|
06-01-2011, 04:24 PM | #4 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
I just gambled that tables must be uncommon inside articles... Well, I will keep working at it then, I just don't know enough to specifiy *that* table instead of *all* tables. Thanks.
|
06-01-2011, 04:32 PM | #5 |
creator of calibre
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The trick is to look for some attribute on the table of one of its parent tags that is likely to be unique. Ideally an id attribute but if not a class or style.
|
Advert | |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Recipe works when mocked up as Python file, fails when converted to Recipe | ode | Recipes | 7 | 09-04-2011 04:57 AM |
Recipe help | kool | Recipes | 3 | 10-22-2010 03:34 PM |
New recipe | kiklop74 | Recipes | 0 | 10-05-2010 04:41 PM |
New recipe | kiklop74 | Recipes | 0 | 10-01-2010 02:42 PM |
Recipe Help | hellonewman | Calibre | 1 | 01-23-2010 03:45 AM |