raise _error.OPMLReadError() from e
if args.file:
f.close()
- name_slug_regexp = _re.compile('[^a-zA-Z0-9._-]+')
+ name_slug_regexp = _re.compile('[^\w\d.-]+')
for feed in new_feeds:
if feed.hasAttribute('xmlUrl'):
url = _saxutils.unescape(feed.getAttribute('xmlUrl'))
+# -*- coding: utf-8 -*-
# Copyright (C) 2004-2013 Aaron Swartz
# Brian Lalor
# Dean Jackson
>>> feed.url
'http://example.com/feed.atom'
- Names can only contain ASCII letters, digits, and '._-'. Here the
+ Names can only contain letters, digits, and '._-'. Here the
invalid space causes an exception:
>>> Feed(name='invalid name')
...
rss2email.error.InvalidFeedName: invalid feed name 'invalid name'
+ However, you aren't restricted to ASCII letters:
+
+ >>> Feed(name='Αθήνα')
+ <Feed Αθήνα (None -> )>
+
You must define a URL:
>>> Feed(name='feed-without-a-url', to='a@b.com').run(send=False)
>>> CONFIG['DEFAULT']['to'] = ''
>>> test_section = CONFIG.pop('feed.test-feed')
+
"""
- _name_regexp = _re.compile('^[a-zA-Z0-9._-]+$')
+ _name_regexp = _re.compile('^[\w\d.-]+$')
# saved/loaded from feed.dat using __getstate__/__setstate__.
_dynamic_attributes = [