View Single Post
Old 09-15-2011, 07:40 AM   #4
JayKindle
Connoisseur
JayKindle began at the beginning.
 
JayKindle's Avatar
 
Posts: 69
Karma: 10
Join Date: Sep 2011
Device: Kindle Fire HD 8
Okay, I know you guys must be busy or just away for a few days.

Anyhow, I've been looking inside the other written recipes and I have been testing for several hours a few codes. I think I got it working: I was able to take down the two banners--and all the rest of the images. Plus clean up some unwanted content.

Right now, my only issue is that there is a very large gap between the author and his post or reply. The author name is on top and a few large spaces down is the text of the person. The problem is that it seems that the person who wrote it, has signed his name under the text, and this is not correct.

Can anyone tell me what code can clear up that huge gap? Also if you see any errors or other things that could make this work better, by all means please let me know. And please don't laugh, I don't know nothing about Python and have very basic skills in HTML -- thanks to MySpace for learning a bit here and there.

Spoiler:
from calibre.web.feeds.news import BasicNewsRecipe

class AutoBlog(BasicNewsRecipe):
title = u'MixingOnBeat'
timefmt = ' [%Y%b%d %H%M]'
language = 'en'
description = 'newspaper'
oldest_article = 60
max_articles_per_feed = 200
no_stylesheets = True
encoding = 'utf8'
use_embedded_content = False
auto_cleanup = True
remove_empty_feeds = True

remove_tags = [
dict(name='div', attrs={'id':['logo', 'sponsor', 'related_objects', 'inset module', 'footer', 'strip_control', 'header', 'navigation', 'Google']}), dict(name='hr'), dict(name='img'), dict(name='Google')
,dict(name=['meta', 'link', 'iframe', 'object', 'embed', 'Google'])
,dict(attrs={'class':['logo', 'sponsor', 'googleAd', 'genbox', 'copyright', 'nav', 'thLeft', 'thRight', 'catHead', 'postdetails', 'signature', 'Google']})
,dict(attrs={'id':['article-promo', 'googleads', 'moduleArticleToolsContainer', 'gallery-subcontent', 'Google']})
]

feeds = [(u'New Topics', u'http://www.mixingonbeat.com/phpbb/rss.php'),
(u'MOB News / Announcements', u'http://www.mixingonbeat.com/phpbb/rss.php?f=1'),
(u'MOB Lounge (non-DJ Topics)', u'http://www.mixingonbeat.com/phpbb/rss.php?f=5'),
(u'Equipment Support (DJs Only)', u'http://www.mixingonbeat.com/phpbb/rss.php?f=6'),
(u'General Mixing Support', u'http://www.mixingonbeat.com/phpbb/rss.php?f=132'),
(u'Harmonic Mixing Support', u'http://www.mixingonbeat.com/phpbb/rss.php?f=34'),
(u'Software Mixing (DJs)', u'http://www.mixingonbeat.com/phpbb/rss.php?f=30'),
(u'MixMeister Support', u'http://www.mixingonbeat.com/phpbb/rss.php?f=66'),
(u'Video Mixing', u'http://www.mixingonbeat.com/phpbb/rss.php?f=49'),
(u'General DJ Discussions', u'http://www.mixingonbeat.com/phpbb/rss.php?f=11'),
(u'Battle DJs', u'http://www.mixingonbeat.com/phpbb/rss.php?f=110'),
(u'Club DJs', u'http://www.mixingonbeat.com/phpbb/rss.php?f=8'),
(u'Karaoke DJs', u'http://www.mixingonbeat.com/phpbb/rss.php?f=32'),
(u'Mobile DJs', u'http://www.mixingonbeat.com/phpbb/rss.php?f=9'),
(u'Radio and Mixshow DJs', u'http://www.mixingonbeat.com/phpbb/rss.php?f=10')
]
JayKindle is offline   Reply With Quote