qnloft-spider/PT/pt_impl/subject_pt.py

37 lines
674 B
Python

from abc import ABC, abstractmethod
class SubjectPt(ABC):
# ======= 一期内容 ========
# 1. 获取指定页面的页数
# 2. 获取指定页面的列表数据
# 3. 获取指定页面的详细数据
# 4. 入库操作
# ======= 二期内容 ========
# 1. 下载种子
# 2. 辅种子
# 3. 删除种子
@abstractmethod
def request_url(self, url):
pass
@abstractmethod
def get_page_num(self, page_html):
pass
@abstractmethod
def get_list_data(self, page_html):
pass
@abstractmethod
def get_detail_data(self, detail_html):
pass
@abstractmethod
def insert_data(self, data):
pass
@abstractmethod
def main_this_pt(self, section_data):
pass