From 37002f9b912cabb332c7f4de0532562c1248a831 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 20 Mar 2010 05:00:08 +0530 Subject: [PATCH] Tulsa World by Darko Miletic --- resources/images/news/tulsaworld.png | Bin 0 -> 995 bytes resources/recipes/tulsaworld.recipe | 47 +++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 resources/images/news/tulsaworld.png create mode 100644 resources/recipes/tulsaworld.recipe diff --git a/resources/images/news/tulsaworld.png b/resources/images/news/tulsaworld.png new file mode 100644 index 0000000000000000000000000000000000000000..dc68d0726603a39338d163dbf0d93a3d42a0d843 GIT binary patch literal 995 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zK-vS0-A-oPfdtD69Mgd`SU*F|v9*U87?^oHT^vI!PA|QDGGCfi_g~TQMhVq)KUoZBm|9wzD?Sa)g^^QY#kadv>+(v&xLpO`3>h9&&I`}pDYHuS&oNm!nUqY);}fTfJT02G zbH+Hc?4x4Tc*e7gC(-~58k`RWLbNkzt2w&c$GWT^B|nD%M4=OYbd8zI8+I#6*R|liIUiX$0}# zzVzEZqkPwmX-C&i71{mNKt8^+@bOzqp5hLd8>x1-XV|CDdvqnECGWbEKy8W6#Jx33 z>ksWLkvX4raqIFQl}nFCZ9Vk*x$Cp@8ZFGWN{o~HVx6|fNLBSu{>ZrJpg_I&?AnCy z3yyBAm~zu|X42Z;Rkw5AaGyC}HOEiNV%mxMuj?n)DLFZRov5Ex5^d@dzkz?vyAX-) zpPnwvKU^DMPIMGtaeM5n@`R)9t+MUIi+caPj6&4Y%QUWA&9S$>&MtIO;cJ?7q}PHL zmu2owKmOKPxy`koR)5?`_R~(8nK^BY%a1P+a=M%nxBEwqe8u~x#x<42Q?C>>EXxa6 z6*WgH`~uI7`%y`SwVbD48A?o;(6M2$r;l%6@zb^8zYcsZ_6&RPUGp(`+64ZzV~aH! z^(>V9m&G{CO*FEMu6sV#RYEt(jcc#v`T0k_|-JJUysDZ)L L)z4*}Q$iB}hWNCN literal 0 HcmV?d00001 diff --git a/resources/recipes/tulsaworld.recipe b/resources/recipes/tulsaworld.recipe new file mode 100644 index 0000000000..bdb6969853 --- /dev/null +++ b/resources/recipes/tulsaworld.recipe @@ -0,0 +1,47 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +tulsaworld.com +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class TulsaWorld(BasicNewsRecipe): + title = 'Tulsa World' + __author__ = 'Darko Miletic' + description = 'Find breaking news, local news, Oklahoma weather, sports, business, entertainment, lifestyle, opinion, government, movies, books, jobs, education, blogs, video & multimedia.' + publisher = 'World Publishing Co.' + category = 'Tulsa World, tulsa world, daily newspaper, breaking news, stories, articles, news, local, weather, coverage, editorial, government, education, community, sports, business, entertainment, lifestyle, opinion, multimedia, media, blogs, consumer, OU, OSU, TU, ORU, football, basketball, school, schools, sudoku, movie reviews, stocks, classified ads, classifieds, books, job, jobs, careers, real estate, home, homes, Oklahoma, northeastern, reviews, auto, autos, archives, forecasts, Sooners, Cowboys, Hurricane, Golden Eagles, NFL, NBA, MLB, pro football, scores, college basketball, college football, college baseball, sports columns, fashion and style, associated press, regional news coverage, health, obituaries, politics, political news, Jenks, Union, Owasso, Tulsa, Booker T. Washington, Trojans, Rams, Hornets, video, photography, photos, images, games, search, the picker, predictions, satellite, family, food, teens, polls, births, celebrations, death notices, divorces, marriages, obituaries, audio, podcasts.' + oldest_article = 2 + max_articles_per_feed = 200 + no_stylesheets = True + encoding = 'utf8' + use_embedded_content = False + language = 'en' + country = 'US' + remove_empty_feeds = True + masthead_url = 'http://www.tulsaworld.com/images/TW_logo-blue-footer.jpg' + extra_css = ' body{font-family: Arial,Verdana,sans-serif } img{margin-bottom: 0.4em} .articleHeadline{font-size: xx-large; font-weight: bold} .articleKicker{font-size: x-large; font-weight: bold} .articleByline,.articleDate{font-size: small} .leadp{font-size: 1.1em} ' + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + , 'linearize_tables' : True + } + keep_only_tags = [dict(name='div',attrs={'id':['ctl00_body1_ArticleControl_divArticleText','ctl00_BodyContent_ArticleControl_divArticleText']})] + + feeds = [ + (u'News' , u'http://www.tulsaworld.com/site/rss.aspx?group=1') + ,(u'Business', u'http://www.tulsaworld.com/site/rss.aspx?group=5') + ,(u'Opinion' , u'http://www.tulsaworld.com/site/rss.aspx?group=7') + ] + + def get_article_url(self, article): + return article.get('link', None).rpartition('&rss')[0] + + def preprocess_html(self, soup): + for item in soup.findAll(style=True): + del item['style'] + return self.adeify_images(soup) \ No newline at end of file