# encoding: utf-8

from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase


class ComicData(ComicDataBase):
    name = 'Lunch (tu.no)'
    language = 'no'
    url = 'http://www.tu.no/lunch/'
    start_date = '2009-10-21'
    rights = 'Børge Lund'


class Crawler(CrawlerBase):
    history_capable_days = 20
    schedule = 'Mo,Tu,We,Th,Fr'
    time_zone = 'Europe/Oslo'

    # Without referer, the server returns a placeholder image
    headers = {'Referer': 'http://www.tu.no/lunch/'}

    def crawl(self, pub_date):
        url = 'http://www.tu.no/?module=TekComics&service=image&id=lunch&key=%s' % (
            pub_date.strftime('%Y-%m-%d'))
        return CrawlerImage(url)

@@ -573,32 +573,46 @@
 ):%0A        url =
+ (%0A           
  'http://www.tu.
@@ -614,16 +614,31 @@
 w.tu.no/
+'%0A            '
 ?module=
@@ -681,12 +681,8 @@
 =%25s'
- %25 (
 %0A   
@@ -686,19 +686,19 @@
         
-   
+) %25
  pub_dat
@@ -719,17 +719,16 @@
 -%25m-%25d')
-)
 %0A       

Fix flake8 warning