修改类名
This commit is contained in:
parent
5efcafa354
commit
30727b6ea8
4
main.py
4
main.py
@ -1,6 +1,6 @@
|
|||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
from requester import Requester
|
from requester import Requester
|
||||||
from web_parser import Parser
|
from web_parser import HtmlParser
|
||||||
from web_img import ImgManager
|
from web_img import ImgManager
|
||||||
|
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ def run_task(task_name: str, url: str):
|
|||||||
"""
|
"""
|
||||||
print(f"{task_name}, 开始下载")
|
print(f"{task_name}, 开始下载")
|
||||||
html_content = Requester().fetch_html(url, task_name)
|
html_content = Requester().fetch_html(url, task_name)
|
||||||
img_url_list = Parser(html_content).get_img_url_list()
|
img_url_list = HtmlParser(html_content).get_img_url_list()
|
||||||
|
|
||||||
img_manager = ImgManager(img_url_list, task_name)
|
img_manager = ImgManager(img_url_list, task_name)
|
||||||
img_manager.batch_fill_image_data()
|
img_manager.batch_fill_image_data()
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
|
|
||||||
class Parser:
|
class HtmlParser:
|
||||||
def __init__(self, html_content: str):
|
def __init__(self, html_content: str):
|
||||||
self.html_content = html_content
|
self.html_content = html_content
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user