Tema: Re: Calibre
Autorius: aspats
Data: 2011-10-09 21:22:11
On 10/08/2011 01:12 PM, Arunasst wrote:
> Laba visi,
>
> stai iskilo poreikis, gal kas gaudosi skriptuose ir galetu parasyti
> fetch news failiuka kokiam lrytui ar delfi. Manau daugelis elektroniniu
> knygu savininku butu dekingiuz tai (gal net alum atsidekotu).
>
> ( http://manual.calibre-ebook.com/news.html )

Lryto pameginau parasyti:

import re
import string

class LrytasLT(BasicNewsRecipe):
	title = u'LrytasLT'
	author = 'st. modest'
	
	oldest_article = 7
	max_articles_per_feed = 100
	no_stylesheets = True
	encoding = 'utf-8'

	feeds = [(u'LrytasLT', u'http://www.lrytas.lt/rss/')]

	def print_version(self, url):
		m = re.search('-(\d*)-', url)
		ret = "http://www.lrytas.lt/print.asp?k=news&id=" + 
string.strip(m.group(0), "-")
		return ret