![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jul 2009
Device: Kindle 2
|
keep_only_tags
So apparently you can keep the tag with a the id of "content"
Code:
keep_only_tags = [dict(id=['content'])] Code:
<div class="content" id="124"></div> Last edited by ultimatebuster; 03-18-2010 at 08:11 PM. |
![]() |
![]() |
![]() |
#2 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jul 2009
Device: Kindle 2
|
ok thanks
|
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
In short, the answer is that you can keep or remove tags with the "class" keyword without conflict with the Python keyword. Almost all recipes do, and looking at a few will show you how it's done. |
|
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
This is how it's done:
id example Code:
keep_only_tags = [dict(attrs={'id':'content'})] Code:
keep_only_tags = [dict(attrs={'class':'content'})] |
![]() |
![]() |
Advert | |
|