From 0dc1f05265064eb1903d6f11e5eebf0a95d76cec Mon Sep 17 00:00:00 2001 From: cmk_T <15726649712@163.com> Date: Tue, 9 Jun 2026 20:33:50 +0800 Subject: [PATCH] =?UTF-8?q?v1:=E5=88=9D=E5=A7=8B=E5=8C=96engine=EF=BC=8C?= =?UTF-8?q?=E5=B0=86=E8=AF=B7=E6=B1=82=E5=8C=BA=E5=88=86=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bald_spider/core/__init__.py | 6 ++++++ bald_spider/core/engine.py | 13 +++++++++++++ test/baidu.py | 5 +++-- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 bald_spider/core/__init__.py create mode 100644 bald_spider/core/engine.py diff --git a/bald_spider/core/__init__.py b/bald_spider/core/__init__.py new file mode 100644 index 0000000..a38e003 --- /dev/null +++ b/bald_spider/core/__init__.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# @Time : 2026/6/9 20:28 +# @Author : cmk +# @File : __init__.py.py +# @Email : 15726649712@163.com diff --git a/bald_spider/core/engine.py b/bald_spider/core/engine.py new file mode 100644 index 0000000..0174821 --- /dev/null +++ b/bald_spider/core/engine.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# @Time : 2026/6/9 20:30 +# @Author : cmk +# @File : engine.py +# @Email : 15726649712@163.com + +class Engine(): + def __init__(self): + pass + + def start_spider(self,spider): + start_url = spider.start_requests() diff --git a/test/baidu.py b/test/baidu.py index efc6593..4aa243b 100644 --- a/test/baidu.py +++ b/test/baidu.py @@ -5,7 +5,7 @@ # @File : baidu.py # @Email : 15726649712@163.com import requests - +from bald_spider.core.engine import Engine class Baidu_Spider(): start_urls = ['https://www.baidu.com/'] @@ -17,4 +17,5 @@ class Baidu_Spider(): if __name__ == '__main__': spider = Baidu_Spider() - spider.start_requests() \ No newline at end of file + engine = Engine() + engine.start_spider(spider) \ No newline at end of file