From: Martin Pitt Date: Mon, 14 Nov 2016 22:41:23 +0100 Subject: Use packaged instead of bundled feedparser Python module --- recipes/lenta_ru.recipe | 4 +++- src/calibre/web/feeds/__init__.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes/lenta_ru.recipe b/recipes/lenta_ru.recipe index aa4dac4..4b6710c 100644 --- a/recipes/lenta_ru.recipe +++ b/recipes/lenta_ru.recipe @@ -4,11 +4,13 @@ Lenta.ru ''' -from calibre.web.feeds.feedparser import parse from calibre.ebooks.BeautifulSoup import Tag from calibre.web.feeds.news import BasicNewsRecipe +from feedparser import parse +from functools import partial import re +parse = partial(parse, agent='Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11') class LentaRURecipe(BasicNewsRecipe): title = u'Lenta.ru: \u041d\u043e\u0432\u043e\u0441\u0442\u0438' diff --git a/src/calibre/web/feeds/__init__.py b/src/calibre/web/feeds/__init__.py index 8c9d748..f262604 100644 --- a/src/calibre/web/feeds/__init__.py +++ b/src/calibre/web/feeds/__init__.py @@ -11,7 +11,10 @@ from calibre.utils.logging import default_log from calibre import entity_to_unicode, strftime, force_unicode from calibre.utils.date import dt_factory, utcnow, local_tz from calibre.utils.cleantext import clean_ascii_chars, clean_xml_chars +from feedparser import parse +from functools import partial +parse = partial(parse, agent='Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11') class Article(object): @@ -334,7 +337,6 @@ def feed_from_xml(raw_xml, title=None, oldest_article=7, max_articles_per_feed=100, get_article_url=lambda item: item.get('link', None), log=default_log): - from calibre.web.feeds.feedparser import parse # Handle unclosed escaped entities. They trip up feedparser and HBR for one # generates them raw_xml = re.sub(r'(&#\d+)([^0-9;])', r'\1;\2', raw_xml) it' value='search'/>
path: root/gnu/tests/data/jami-dummy-account.dat
AgeCommit message (Expand)Author
2021-08-02Reinstate "services: Add a service for Jami."...This reverts commit 4673f817938d9d2b1b40a072ab2e0c44a32ccc97, which reverted commit 69dcc24c9f0cdfea674eb690e7755d26a25ced2b with the fix detailed below. Thanks to Christopher Baines for reporting the failure and proposing a fix. * guix/self.scm (compiled-guix) [*system-test-modules*]: Add the test data files via the 'extra-files' argument. * gnu/local.mk (dist_patch_DATA): Move the tests/data/jami-dummy-account.dat file to... * gnu/local.mk (MODULES_NOT_COMPILED): ... here. Maxim Cournoyer
2021-08-02Revert "services: Add a service for Jami."...This reverts commit 69dcc24c9f0cdfea674eb690e7755d26a25ced2b. It broke 'guix pull'. Maxim Cournoyer
2021-08-02services: Add a service for Jami....* gnu/services/telephony.scm (string-or-computed-file?) (string-list?, account-fingerprint-list?): New procedures. (maybe-string-list, maybe-account-fingerprint-list) (maybe-boolean, maybe-string, jami-account-list): New configuration field types. (serialize-string-list, serialize-boolean, serialize-string) (jami-account, jami-account->alist, jami-configuration) (jami-account-list?, jami-account-list-maybe): New procedures. (%jami-accounts): New variable. (jami-configuration->command-line-arguments): New procedure. (jami-dbus-session-activation, jami-shepherd-services): New procedures. (jami-service-type): New variable. * gnu/build/jami-service.scm: New file. * gnu/tests/data/jami-dummy-account.dat: Likewise. * gnu/tests/telephony.scm: Likewise. * gnu/local.mk (GNU_SYSTEM_MODULES): Register them. * Makefile.am (SCM_TESTS): Register the test file. (dist_patch_DATA): Register the new data file. * doc/guix.texi (Telephony Services): Document it. Maxim Cournoyer