mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
...
This commit is contained in:
parent
9f5508f921
commit
32ed063b5b
@ -7,7 +7,6 @@ lwn.net
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
class WeeklyLWN(BasicNewsRecipe):
|
class WeeklyLWN(BasicNewsRecipe):
|
||||||
@ -54,7 +53,6 @@ class WeeklyLWN(BasicNewsRecipe):
|
|||||||
|
|
||||||
articles = {}
|
articles = {}
|
||||||
ans = []
|
ans = []
|
||||||
old_section = None
|
|
||||||
url_re = re.compile('^/Articles/')
|
url_re = re.compile('^/Articles/')
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
@ -84,7 +82,7 @@ class WeeklyLWN(BasicNewsRecipe):
|
|||||||
if tag_url == None:
|
if tag_url == None:
|
||||||
break
|
break
|
||||||
body = tag_url
|
body = tag_url
|
||||||
if tag_url.string == None:
|
if tag_url.string == None:
|
||||||
continue
|
continue
|
||||||
elif tag_url.string == 'Full Story':
|
elif tag_url.string == 'Full Story':
|
||||||
break
|
break
|
||||||
@ -95,7 +93,7 @@ class WeeklyLWN(BasicNewsRecipe):
|
|||||||
|
|
||||||
if tag_url == None:
|
if tag_url == None:
|
||||||
break
|
break
|
||||||
|
|
||||||
article = dict(
|
article = dict(
|
||||||
title=tag_title.string,
|
title=tag_title.string,
|
||||||
url= 'http://lwn.net' + tag_url['href'].split('#')[0] + '?format=printable',
|
url= 'http://lwn.net' + tag_url['href'].split('#')[0] + '?format=printable',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user