From ec56f58e4765b43fe4c1747fff1fec592c30e5c5 Mon Sep 17 00:00:00 2001 From: WeijiangChen Date: Sun, 12 Mar 2023 21:56:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=98=E8=AE=B0=E9=87=8D=E8=BD=BD=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/network/request_contents.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/module/network/request_contents.py b/module/network/request_contents.py index 631c32ca..cb689ea7 100644 --- a/module/network/request_contents.py +++ b/module/network/request_contents.py @@ -7,16 +7,14 @@ import re FILTER = "|".join(settings.rss_parser.filter) + @dataclass class TorrentInfo: name: str torrent_link: str -class RequestContent: - def __init__(self): - self._req = RequestURL() - +class RequestContent(RequestURL): # Mikanani RSS def get_torrents(self, _url: str) -> [TorrentInfo]: soup = self._req.get_content(_url) @@ -37,6 +35,3 @@ class RequestContent: # API JSON def get_json(self, _url) -> dict: return self._req.get_content(_url, content="json") - - def close_session(self): - self._req.close()