def test_clean_html_body(self): from yarss2 import load_libs load_libs() web_page = """<html> <head> <title> Page title </title> </head> <body> <p id="firstpara" align="center"> This is paragraph <b> one </b> </p> <p id="secondpara" align="blah"> This is paragraph <b> two </b> </p> </body> </html>""" cleaned = http.clean_html_body(web_page)
def test_clean_html_body(self): from yarss2 import load_libs load_libs() web_page = """<html> <head> <title> Page title </title> </head> <body> <p id="firstpara" align="center"> This is paragraph <b> one </b> </p> <p id="secondpara" align="blah"> This is paragraph <b> two </b> </p> </body> </html>""" http.clean_html_body(web_page)
import deluge.config import tempfile import deluge.configmanager import deluge.core.preferencesmanager import yarss2.util.common from yarss2 import yarss_config import deluge.log deluge.log.setupLogger("none") from deluge.log import LOG from yarss2 import load_libs load_libs() def disable_new_release_check(): import deluge.core.preferencesmanager deluge.core.preferencesmanager.DEFAULT_PREFS["new_release_check"] = False disable_new_release_check() def get_default_subscriptions(count): subscriptions = {} for i in range(count): subscriptions[str(i)] = yarss_config.get_fresh_subscription_config( name="Non-matching subscription",
import deluge.config import tempfile import deluge.configmanager import deluge.core.preferencesmanager import yarss2.util.common from yarss2 import yarss_config import deluge.log deluge.log.setupLogger("none") import pkg_resources, sys from deluge.log import LOG as log from yarss2 import load_libs load_libs() def get_default_subscriptions(count): subscriptions = {} for i in range(count): subscriptions[str(i)] = yarss_config.get_fresh_subscription_config( name="Non-matching subscription", last_match=yarss2.util.common.get_default_date().isoformat(), rssfeed_key="0", key=str(i), regex_include=None, regex_exclude=None, ) return subscriptions