feat: init

This commit is contained in:
mol
2023-04-25 15:20:13 +08:00
commit 83969a26d9
6 changed files with 90 additions and 0 deletions

18
RssManager.py Normal file
View File

@ -0,0 +1,18 @@
import thread
from Rss import *
class RssManager():
def __init__(self, rss_options):
self.rss_list = [Rss(opt['id'], opt['url'], opt['rss_pipe_handler'], opt['result_handler']) for opt in rss_options]
def run(self):
try:
for rss in rss_list:
thread.start_new_thread(rss.run)
except:
print('Error: unable to start thread')
print('Info: start sync run')
for rss in rss_list:
rss.run()