diff --git a/slixfeed/task.py b/slixfeed/task.py index 6f4b016..7d9aa67 100644 --- a/slixfeed/task.py +++ b/slixfeed/task.py @@ -44,10 +44,9 @@ import logging import os import slixmpp -import slixfeed.config as config -from slixfeed.fetch import download_updates +from slixfeed.config import initdb, get_default_dbdir, get_value_default from slixfeed.datetime import current_time -from slixfeed.file import initdb, get_default_dbdir +from slixfeed.fetch import download_updates from slixfeed.sqlite import ( get_entry_unread, get_settings_value, @@ -403,7 +402,7 @@ async def check_updates(jid): while True: # print(await current_time(), "> CHCK UPDATE",jid) await initdb(jid, download_updates) - val = await config.get_value_default("check", "Settings") + val = await get_value_default("check", "Settings") await asyncio.sleep(60 * float(val)) # Schedule to call this function again in 90 minutes # loop.call_at( diff --git a/slixfeed/url.py b/slixfeed/url.py index 8497a20..edd22ac 100644 --- a/slixfeed/url.py +++ b/slixfeed/url.py @@ -27,25 +27,6 @@ from urllib.parse import ( ) -def get_hostname(url): - """ - Get hostname. - - Parameters - ---------- - url : str - URL. - - Returns - ------- - hostname : str - Hostname. - """ - parted_url = urlsplit(url) - hostname = parted_url.netloc - return hostname - - # NOTE hostname and protocol are listed as one in file # proxies.yaml. Perhaps a better practice would be to have # them separated. File proxies.yaml will remainas is in order