Update to fix client, add head to the css downgrade weights

pull/11/head
Richard Harding 12 years ago
parent 46ede7ccfb
commit 3f70a49a22

@ -1 +1,2 @@
VERSION = '0.1.2'
import client

@ -16,6 +16,7 @@ from breadability.readable import Article
LOGLEVEL = 'WARNING'
def parse_args():
desc = "A fast python port of arc90's readability tool"
parser = argparse.ArgumentParser(description=desc)
@ -89,7 +90,8 @@ def main():
webbrowser.open(pathname)
else:
# Wrap sys.stdout into a StreamWriter to allow writing unicode.
sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
sys.stdout = codecs.getwriter(
locale.getpreferredencoding())(sys.stdout)
sys.stdout.write(doc.readable)

@ -15,7 +15,7 @@ CLS_MAYBE = re.compile('and|article|body|column|main|shadow', re.I)
CLS_WEIGHT_POSITIVE = re.compile(('article|body|content|entry|hentry|main|'
'page|pagination|post|text|blog|story'), re.I)
CLS_WEIGHT_NEGATIVE = re.compile(('combx|comment|com-|contact|foot|footer|'
'footnote|masthead|media|meta|outbrain|promo|related|scroll|shoutbox|'
'footnote|head|masthead|media|meta|outbrain|promo|related|scroll|shoutbox|'
'sidebar|sponsor|shopping|tags|tool|widget'), re.I)

Loading…
Cancel
Save