home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 January / maximum-cd-2011-01.iso / DiscContents / calibre-0.7.26.msi / file_4036 < prev    next >
Encoding:
Text File  |  2010-10-09  |  24.2 KB  |  352 lines

  1. #!/usr/bin/env  python
  2.  
  3. __license__   = 'GPL v3'
  4. __copyright__ = 'Copyright 2010 Starson17'
  5. '''
  6. www.gocomics.com
  7. '''
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9. import mechanize
  10.  
  11. class GoComics(BasicNewsRecipe):
  12.     title               = 'GoComics'
  13.     __author__          = 'Starson17'
  14.     __version__         = '1.03'
  15.     __date__            = '09 October 2010'
  16.     description         = u'200+ Comics - Customize for more days/comics: Defaults to 7 days, 25 comics - 20 general, 5 editorial.'
  17.     category            = 'news, comics'
  18.     language            = 'en'
  19.     use_embedded_content= False
  20.     no_stylesheets      = True
  21.     remove_javascript   = True
  22.     cover_url           = 'http://paulbuckley14059.files.wordpress.com/2008/06/calvin-and-hobbes.jpg'
  23.  
  24.     ####### USER PREFERENCES - COMICS, IMAGE SIZE AND NUMBER OF COMICS TO RETRIEVE ########
  25.     # num_comics_to_get - I've tried up to 99 on Calvin&Hobbes
  26.     num_comics_to_get = 7
  27.     # comic_size 300 is small, 600 is medium, 900 is large, 1500 is extra-large
  28.     comic_size = 900
  29.     # CHOOSE COMIC STRIPS BELOW - REMOVE COMMENT '# ' FROM IN FRONT OF DESIRED STRIPS
  30.     # Please do not overload their servers by selecting all comics and 1000 strips from each!
  31.  
  32.     conversion_options = {'linearize_tables'  : True
  33.                         , 'comment'           : description
  34.                         , 'tags'              : category
  35.                         , 'language'          : language
  36.                         }
  37.  
  38.     keep_only_tags     = [dict(name='div', attrs={'class':['feature','banner']}),
  39.                           ]
  40.  
  41.     remove_tags = [dict(name='a', attrs={'class':['beginning','prev','cal','next','newest']}),
  42.                    dict(name='div', attrs={'class':['tag-wrapper']}),
  43.                    dict(name='ul', attrs={'class':['share-nav','feature-nav']}),
  44.                    ]
  45.  
  46.     def get_browser(self):
  47.         br = BasicNewsRecipe.get_browser(self)
  48.         cookies = mechanize.CookieJar()
  49.         br = mechanize.build_opener(mechanize.HTTPCookieProcessor(cookies))
  50.         br.addheaders = [('Referer','http://www.gocomics.com/')]
  51.         return br
  52.  
  53.     def parse_index(self):
  54.         feeds = []
  55.         for title, url in [
  56.                             ######## COMICS - GENERAL ########
  57.                             (u"2 Cows and a Chicken", u"http://www.gocomics.com/2cowsandachicken"),
  58.                             # (u"9 to 5", u"http://www.gocomics.com/9to5"),
  59.                             # (u"The Academia Waltz", u"http://www.gocomics.com/academiawaltz"),
  60.                             # (u"Adam@Home", u"http://www.gocomics.com/adamathome"),
  61.                             # (u"Agnes", u"http://www.gocomics.com/agnes"),
  62.                             # (u"Andy Capp", u"http://www.gocomics.com/andycapp"),
  63.                             # (u"Animal Crackers", u"http://www.gocomics.com/animalcrackers"),
  64.                             # (u"Annie", u"http://www.gocomics.com/annie"),
  65.                             (u"The Argyle Sweater", u"http://www.gocomics.com/theargylesweater"),
  66.                             # (u"Ask Shagg", u"http://www.gocomics.com/askshagg"),
  67.                             (u"B.C.", u"http://www.gocomics.com/bc"),
  68.                             # (u"Back in the Day", u"http://www.gocomics.com/backintheday"),
  69.                             # (u"Bad Reporter", u"http://www.gocomics.com/badreporter"),
  70.                             # (u"Baldo", u"http://www.gocomics.com/baldo"),
  71.                             # (u"Ballard Street", u"http://www.gocomics.com/ballardstreet"),
  72.                             # (u"Barkeater Lake", u"http://www.gocomics.com/barkeaterlake"),
  73.                             # (u"The Barn", u"http://www.gocomics.com/thebarn"),
  74.                             # (u"Basic Instructions", u"http://www.gocomics.com/basicinstructions"),
  75.                             # (u"Bewley", u"http://www.gocomics.com/bewley"),
  76.                             # (u"Big Top", u"http://www.gocomics.com/bigtop"),
  77.                             # (u"Biographic", u"http://www.gocomics.com/biographic"),
  78.                             (u"Birdbrains", u"http://www.gocomics.com/birdbrains"),
  79.                             # (u"Bleeker: The Rechargeable Dog", u"http://www.gocomics.com/bleeker"),
  80.                             # (u"Bliss", u"http://www.gocomics.com/bliss"),
  81.                             (u"Bloom County", u"http://www.gocomics.com/bloomcounty"),
  82.                             # (u"Bo Nanas", u"http://www.gocomics.com/bonanas"),
  83.                             # (u"Bob the Squirrel", u"http://www.gocomics.com/bobthesquirrel"),
  84.                             # (u"The Boiling Point", u"http://www.gocomics.com/theboilingpoint"),
  85.                             # (u"Boomerangs", u"http://www.gocomics.com/boomerangs"),
  86.                             # (u"The Boondocks", u"http://www.gocomics.com/boondocks"),
  87.                             # (u"Bottomliners", u"http://www.gocomics.com/bottomliners"),
  88.                             # (u"Bound and Gagged", u"http://www.gocomics.com/boundandgagged"),
  89.                             # (u"Brainwaves", u"http://www.gocomics.com/brainwaves"),
  90.                             # (u"Brenda Starr", u"http://www.gocomics.com/brendastarr"),
  91.                             # (u"Brewster Rockit", u"http://www.gocomics.com/brewsterrockit"),
  92.                             # (u"Broom Hilda", u"http://www.gocomics.com/broomhilda"),
  93.                             (u"Calvin and Hobbes", u"http://www.gocomics.com/calvinandhobbes"),
  94.                             # (u"Candorville", u"http://www.gocomics.com/candorville"),
  95.                             # (u"Cathy", u"http://www.gocomics.com/cathy"),
  96.                             # (u"C'est la Vie", u"http://www.gocomics.com/cestlavie"),
  97.                             # (u"Chuckle Bros", u"http://www.gocomics.com/chucklebros"),
  98.                             # (u"Citizen Dog", u"http://www.gocomics.com/citizendog"),
  99.                             # (u"The City", u"http://www.gocomics.com/thecity"),
  100.                             # (u"Cleats", u"http://www.gocomics.com/cleats"),
  101.                             # (u"Close to Home", u"http://www.gocomics.com/closetohome"),
  102.                             # (u"Compu-toon", u"http://www.gocomics.com/compu-toon"),
  103.                             # (u"Cornered", u"http://www.gocomics.com/cornered"),
  104.                             (u"Cul de Sac", u"http://www.gocomics.com/culdesac"),
  105.                             # (u"Daddy's Home", u"http://www.gocomics.com/daddyshome"),
  106.                             # (u"Deep Cover", u"http://www.gocomics.com/deepcover"),
  107.                             # (u"Dick Tracy", u"http://www.gocomics.com/dicktracy"),
  108.                             # (u"The Dinette Set", u"http://www.gocomics.com/dinetteset"),
  109.                             # (u"Dog Eat Doug", u"http://www.gocomics.com/dogeatdoug"),
  110.                             # (u"Domestic Abuse", u"http://www.gocomics.com/domesticabuse"),
  111.                             # (u"Doodles", u"http://www.gocomics.com/doodles"),
  112.                             (u"Doonesbury", u"http://www.gocomics.com/doonesbury"),
  113.                             # (u"The Doozies", u"http://www.gocomics.com/thedoozies"),
  114.                             # (u"The Duplex", u"http://www.gocomics.com/duplex"),
  115.                             # (u"Eek!", u"http://www.gocomics.com/eek"),
  116.                             # (u"The Elderberries", u"http://www.gocomics.com/theelderberries"),
  117.                             # (u"Flight Deck", u"http://www.gocomics.com/flightdeck"),
  118.                             # (u"Flo and Friends", u"http://www.gocomics.com/floandfriends"),
  119.                             # (u"The Flying McCoys", u"http://www.gocomics.com/theflyingmccoys"),
  120.                             (u"For Better or For Worse", u"http://www.gocomics.com/forbetterorforworse"),
  121.                             # (u"For Heaven's Sake", u"http://www.gocomics.com/forheavenssake"),
  122.                             # (u"Fort Knox", u"http://www.gocomics.com/fortknox"),
  123.                             # (u"FoxTrot", u"http://www.gocomics.com/foxtrot"),
  124.                             (u"FoxTrot Classics", u"http://www.gocomics.com/foxtrotclassics"),
  125.                             # (u"Frank & Ernest", u"http://www.gocomics.com/frankandernest"),
  126.                             # (u"Fred Basset", u"http://www.gocomics.com/fredbasset"),
  127.                             # (u"Free Range", u"http://www.gocomics.com/freerange"),
  128.                             # (u"Frog Applause", u"http://www.gocomics.com/frogapplause"),
  129.                             # (u"The Fusco Brothers", u"http://www.gocomics.com/thefuscobrothers"),
  130.                             (u"Garfield", u"http://www.gocomics.com/garfield"),
  131.                             # (u"Garfield Minus Garfield", u"http://www.gocomics.com/garfieldminusgarfield"),
  132.                             # (u"Gasoline Alley", u"http://www.gocomics.com/gasolinealley"),
  133.                             # (u"Gil Thorp", u"http://www.gocomics.com/gilthorp"),
  134.                             # (u"Ginger Meggs", u"http://www.gocomics.com/gingermeggs"),
  135.                             # (u"Girls & Sports", u"http://www.gocomics.com/girlsandsports"),
  136.                             # (u"Haiku Ewe", u"http://www.gocomics.com/haikuewe"),
  137.                             # (u"Heart of the City", u"http://www.gocomics.com/heartofthecity"),
  138.                             # (u"Heathcliff", u"http://www.gocomics.com/heathcliff"),
  139.                             # (u"Herb and Jamaal", u"http://www.gocomics.com/herbandjamaal"),
  140.                             # (u"Home and Away", u"http://www.gocomics.com/homeandaway"),
  141.                             # (u"Housebroken", u"http://www.gocomics.com/housebroken"),
  142.                             # (u"Hubert and Abby", u"http://www.gocomics.com/hubertandabby"),
  143.                             # (u"Imagine This", u"http://www.gocomics.com/imaginethis"),
  144.                             # (u"In the Bleachers", u"http://www.gocomics.com/inthebleachers"),
  145.                             # (u"In the Sticks", u"http://www.gocomics.com/inthesticks"),
  146.                             # (u"Ink Pen", u"http://www.gocomics.com/inkpen"),
  147.                             # (u"It's All About You", u"http://www.gocomics.com/itsallaboutyou"),
  148.                             # (u"Joe Vanilla", u"http://www.gocomics.com/joevanilla"),
  149.                             # (u"La Cucaracha", u"http://www.gocomics.com/lacucaracha"),
  150.                             # (u"Last Kiss", u"http://www.gocomics.com/lastkiss"),
  151.                             # (u"Legend of Bill", u"http://www.gocomics.com/legendofbill"),
  152.                             # (u"Liberty Meadows", u"http://www.gocomics.com/libertymeadows"),
  153.                             (u"Lio", u"http://www.gocomics.com/lio"),
  154.                             # (u"Little Dog Lost", u"http://www.gocomics.com/littledoglost"),
  155.                             # (u"Little Otto", u"http://www.gocomics.com/littleotto"),
  156.                             # (u"Loose Parts", u"http://www.gocomics.com/looseparts"),
  157.                             # (u"Love Is...", u"http://www.gocomics.com/loveis"),
  158.                             # (u"Maintaining", u"http://www.gocomics.com/maintaining"),
  159.                             # (u"The Meaning of Lila", u"http://www.gocomics.com/meaningoflila"),
  160.                             # (u"Middle-Aged White Guy", u"http://www.gocomics.com/middleagedwhiteguy"),
  161.                             # (u"The Middletons", u"http://www.gocomics.com/themiddletons"),
  162.                             # (u"Momma", u"http://www.gocomics.com/momma"),
  163.                             # (u"Mutt & Jeff", u"http://www.gocomics.com/muttandjeff"),
  164.                             # (u"Mythtickle", u"http://www.gocomics.com/mythtickle"),
  165.                             # (u"Nest Heads", u"http://www.gocomics.com/nestheads"),
  166.                             # (u"NEUROTICA", u"http://www.gocomics.com/neurotica"),
  167.                             (u"New Adventures of Queen Victoria", u"http://www.gocomics.com/thenewadventuresofqueenvictoria"),
  168.                             (u"Non Sequitur", u"http://www.gocomics.com/nonsequitur"),
  169.                             # (u"The Norm", u"http://www.gocomics.com/thenorm"),
  170.                             # (u"On A Claire Day", u"http://www.gocomics.com/onaclaireday"),
  171.                             # (u"One Big Happy", u"http://www.gocomics.com/onebighappy"),
  172.                             # (u"The Other Coast", u"http://www.gocomics.com/theothercoast"),
  173.                             # (u"Out of the Gene Pool Re-Runs", u"http://www.gocomics.com/outofthegenepool"),
  174.                             # (u"Overboard", u"http://www.gocomics.com/overboard"),
  175.                             # (u"Pibgorn", u"http://www.gocomics.com/pibgorn"),
  176.                             # (u"Pibgorn Sketches", u"http://www.gocomics.com/pibgornsketches"),
  177.                             (u"Pickles", u"http://www.gocomics.com/pickles"),
  178.                             # (u"Pinkerton", u"http://www.gocomics.com/pinkerton"),
  179.                             # (u"Pluggers", u"http://www.gocomics.com/pluggers"),
  180.                             (u"Pooch Cafe", u"http://www.gocomics.com/poochcafe"),
  181.                             # (u"PreTeena", u"http://www.gocomics.com/preteena"),
  182.                             # (u"The Quigmans", u"http://www.gocomics.com/thequigmans"),
  183.                             # (u"Rabbits Against Magic", u"http://www.gocomics.com/rabbitsagainstmagic"),
  184.                             (u"Real Life Adventures", u"http://www.gocomics.com/reallifeadventures"),
  185.                             # (u"Red and Rover", u"http://www.gocomics.com/redandrover"),
  186.                             # (u"Red Meat", u"http://www.gocomics.com/redmeat"),
  187.                             # (u"Reynolds Unwrapped", u"http://www.gocomics.com/reynoldsunwrapped"),
  188.                             # (u"Ronaldinho Gaucho", u"http://www.gocomics.com/ronaldinhogaucho"),
  189.                             # (u"Rubes", u"http://www.gocomics.com/rubes"),
  190.                             # (u"Scary Gary", u"http://www.gocomics.com/scarygary"),
  191.                             (u"Shoe", u"http://www.gocomics.com/shoe"),
  192.                             # (u"Shoecabbage", u"http://www.gocomics.com/shoecabbage"),
  193.                             # (u"Skin Horse", u"http://www.gocomics.com/skinhorse"),
  194.                             # (u"Slowpoke", u"http://www.gocomics.com/slowpoke"),
  195.                             # (u"Speed Bump", u"http://www.gocomics.com/speedbump"),
  196.                             # (u"State of the Union", u"http://www.gocomics.com/stateoftheunion"),
  197.                             (u"Stone Soup", u"http://www.gocomics.com/stonesoup"),
  198.                             # (u"Strange Brew", u"http://www.gocomics.com/strangebrew"),
  199.                             # (u"Sylvia", u"http://www.gocomics.com/sylvia"),
  200.                             # (u"Tank McNamara", u"http://www.gocomics.com/tankmcnamara"),
  201.                             # (u"Tiny Sepuku", u"http://www.gocomics.com/tinysepuku"),
  202.                             # (u"TOBY", u"http://www.gocomics.com/toby"),
  203.                             # (u"Tom the Dancing Bug", u"http://www.gocomics.com/tomthedancingbug"),
  204.                             # (u"Too Much Coffee Man", u"http://www.gocomics.com/toomuchcoffeeman"),
  205.                             # (u"W.T. Duck", u"http://www.gocomics.com/wtduck"),
  206.                             # (u"Watch Your Head", u"http://www.gocomics.com/watchyourhead"),
  207.                             # (u"Wee Pals", u"http://www.gocomics.com/weepals"),
  208.                             # (u"Winnie the Pooh", u"http://www.gocomics.com/winniethepooh"),
  209.                             (u"Wizard of Id", u"http://www.gocomics.com/wizardofid"),
  210.                             # (u"Working It Out", u"http://www.gocomics.com/workingitout"),
  211.                             # (u"Yenny", u"http://www.gocomics.com/yenny"),
  212.                             # (u"Zack Hill", u"http://www.gocomics.com/zackhill"),
  213.                             (u"Ziggy", u"http://www.gocomics.com/ziggy"),
  214.                             ######## COMICS - EDITORIAL ########
  215.                             ("Lalo Alcaraz","http://www.gocomics.com/laloalcaraz"),
  216.                             ("Nick Anderson","http://www.gocomics.com/nickanderson"),
  217.                             ("Chuck Asay","http://www.gocomics.com/chuckasay"),
  218.                             ("Tony Auth","http://www.gocomics.com/tonyauth"),
  219.                             ("Donna Barstow","http://www.gocomics.com/donnabarstow"),
  220.                             # ("Bruce Beattie","http://www.gocomics.com/brucebeattie"),
  221.                             # ("Clay Bennett","http://www.gocomics.com/claybennett"),
  222.                             # ("Lisa Benson","http://www.gocomics.com/lisabenson"),
  223.                             # ("Steve Benson","http://www.gocomics.com/stevebenson"),
  224.                             # ("Chip Bok","http://www.gocomics.com/chipbok"),
  225.                             # ("Steve Breen","http://www.gocomics.com/stevebreen"),
  226.                             # ("Chris Britt","http://www.gocomics.com/chrisbritt"),
  227.                             # ("Stuart Carlson","http://www.gocomics.com/stuartcarlson"),
  228.                             # ("Ken Catalino","http://www.gocomics.com/kencatalino"),
  229.                             # ("Paul Conrad","http://www.gocomics.com/paulconrad"),
  230.                             # ("Jeff Danziger","http://www.gocomics.com/jeffdanziger"),
  231.                             # ("Matt Davies","http://www.gocomics.com/mattdavies"),
  232.                             # ("John Deering","http://www.gocomics.com/johndeering"),
  233.                             # ("Bob Gorrell","http://www.gocomics.com/bobgorrell"),
  234.                             # ("Walt Handelsman","http://www.gocomics.com/walthandelsman"),
  235.                             # ("Clay Jones","http://www.gocomics.com/clayjones"),
  236.                             # ("Kevin Kallaugher","http://www.gocomics.com/kevinkallaugher"),
  237.                             # ("Steve Kelley","http://www.gocomics.com/stevekelley"),
  238.                             # ("Dick Locher","http://www.gocomics.com/dicklocher"),
  239.                             # ("Chan Lowe","http://www.gocomics.com/chanlowe"),
  240.                             # ("Mike Luckovich","http://www.gocomics.com/mikeluckovich"),
  241.                             # ("Gary Markstein","http://www.gocomics.com/garymarkstein"),
  242.                             # ("Glenn McCoy","http://www.gocomics.com/glennmccoy"),
  243.                             # ("Jim Morin","http://www.gocomics.com/jimmorin"),
  244.                             # ("Jack Ohman","http://www.gocomics.com/jackohman"),
  245.                             # ("Pat Oliphant","http://www.gocomics.com/patoliphant"),
  246.                             # ("Joel Pett","http://www.gocomics.com/joelpett"),
  247.                             # ("Ted Rall","http://www.gocomics.com/tedrall"),
  248.                             # ("Michael Ramirez","http://www.gocomics.com/michaelramirez"),
  249.                             # ("Marshall Ramsey","http://www.gocomics.com/marshallramsey"),
  250.                             # ("Steve Sack","http://www.gocomics.com/stevesack"),
  251.                             # ("Ben Sargent","http://www.gocomics.com/bensargent"),
  252.                             # ("Drew Sheneman","http://www.gocomics.com/drewsheneman"),
  253.                             # ("John Sherffius","http://www.gocomics.com/johnsherffius"),
  254.                             # ("Small World","http://www.gocomics.com/smallworld"),
  255.                             # ("Scott Stantis","http://www.gocomics.com/scottstantis"),
  256.                             # ("Wayne Stayskal","http://www.gocomics.com/waynestayskal"),
  257.                             # ("Dana Summers","http://www.gocomics.com/danasummers"),
  258.                             # ("Paul Szep","http://www.gocomics.com/paulszep"),
  259.                             # ("Mike Thompson","http://www.gocomics.com/mikethompson"),
  260.                             # ("Tom Toles","http://www.gocomics.com/tomtoles"),
  261.                             # ("Gary Varvel","http://www.gocomics.com/garyvarvel"),
  262.                             # ("ViewsAfrica","http://www.gocomics.com/viewsafrica"),
  263.                             # ("ViewsAmerica","http://www.gocomics.com/viewsamerica"),
  264.                             # ("ViewsAsia","http://www.gocomics.com/viewsasia"),
  265.                             # ("ViewsBusiness","http://www.gocomics.com/viewsbusiness"),
  266.                             # ("ViewsEurope","http://www.gocomics.com/viewseurope"),
  267.                             # ("ViewsLatinAmerica","http://www.gocomics.com/viewslatinamerica"),
  268.                             # ("ViewsMidEast","http://www.gocomics.com/viewsmideast"),
  269.                             # ("Views of the World","http://www.gocomics.com/viewsoftheworld"),
  270.                             # ("Kerry Waghorn","http://www.gocomics.com/facesinthenews"),
  271.                             # ("Dan Wasserman","http://www.gocomics.com/danwasserman"),
  272.                             # ("Signe Wilkinson","http://www.gocomics.com/signewilkinson"),
  273.                             # ("Wit of the World","http://www.gocomics.com/witoftheworld"),
  274.                             # ("Don Wright","http://www.gocomics.com/donwright"),
  275.                              ]:
  276.             print 'Working on: ', title
  277.             articles = self.make_links(url)
  278.             if articles:
  279.                 feeds.append((title, articles))
  280.         return feeds
  281.  
  282.     def make_links(self, url):
  283.         title = 'Temp'
  284.         current_articles = []
  285.         pages = range(1, self.num_comics_to_get+1)
  286.         for page in pages:
  287.             page_soup = self.index_to_soup(url)
  288.             if page_soup:
  289.                 try:
  290.                   strip_title = page_soup.find(name='div', attrs={'class':'top'}).h1.a.string
  291.                 except:
  292.                   strip_title = 'Error - no Title found'
  293.                 try:
  294.                   date_title = page_soup.find('ul', attrs={'class': 'feature-nav'}).li.string
  295.                   if not date_title:
  296.                       date_title = page_soup.find('ul', attrs={'class': 'feature-nav'}).li.string
  297.                 except:
  298.                   date_title = 'Error - no Date found'
  299.                 title = strip_title + ' - ' + date_title
  300.                 for i in range(2):
  301.                   try:
  302.                     strip_url_date = page_soup.find(name='div', attrs={'class':'top'}).h1.a['href']
  303.                     break #success - this is normal exit
  304.                   except:
  305.                     strip_url_date = None
  306.                     continue #try to get strip_url_date again
  307.                 for i in range(2):
  308.                   try:
  309.                     prev_strip_url_date = page_soup.find('a', attrs={'class': 'prev'})['href']
  310.                     break #success - this is normal exit
  311.                   except:
  312.                     prev_strip_url_date = None
  313.                     continue #try to get prev_strip_url_date again
  314.                 if strip_url_date:
  315.                   page_url = 'http://www.gocomics.com' + strip_url_date
  316.                 else:
  317.                   continue
  318.                 if prev_strip_url_date:
  319.                   prev_page_url = 'http://www.gocomics.com' + prev_strip_url_date
  320.                 else:
  321.                   continue
  322.             current_articles.append({'title': title, 'url': page_url, 'description':'', 'date':''})
  323.             url = prev_page_url
  324.         current_articles.reverse()
  325.         return current_articles
  326.  
  327.     def preprocess_html(self, soup):
  328.         if soup.title:
  329.             title_string = soup.title.string.strip()
  330.             _cd = title_string.split(',',1)[1]
  331.             comic_date = ' '.join(_cd.split(' ', 4)[0:-1])
  332.         if soup.h1.span:
  333.             artist = soup.h1.span.string
  334.             soup.h1.span.string.replaceWith(comic_date + artist)
  335.         feature_item = soup.find('p',attrs={'class':'feature_item'})
  336.         if feature_item.a:
  337.             a_tag = feature_item.a
  338.             a_href = a_tag["href"]
  339.             img_tag = a_tag.img
  340.             img_tag["src"] = a_href
  341.             img_tag["width"] = self.comic_size
  342.             img_tag["height"] = None
  343.         return self.adeify_images(soup)
  344.  
  345.     extra_css = '''
  346.                     h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
  347.                     h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
  348.                     img {max-width:100%; min-width:100%;}
  349.                     p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
  350.                     body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
  351.         '''
  352.