分享71个HTML个性简实模板,总有一款适合您
71个HTML个性简实模板下载链接:https://pan.baidu.com/s/16v_eQicfLtICNPQkZRrYzg?pwd=s065
提取码:s065
Python采集代码下载链接:采集代码.zip - 蓝奏云
VIZ 简实模板
韩国风模板HTML
旅行社模板HTML
旅行社资讯旅游导航
WE 个性模板
import os
import shutil
import time
from time import sleep
from docx import Document
from docx.shared import Inches
from framework.base.BaseFrame import BaseFrame
from sprider.business.DownLoad import DownLoad
from sprider.business.SeleniumTools import SeleniumTools
from sprider.business.SpriderTools import SpriderTools
from selenium import webdriver
from selenium.webdriver.common.by import By
from sprider.model.SpriderEntity import SpriderEntity
from sprider.access.SpriderAccess import SpriderAccess
title_name = "社会教育"
class ChinaZJsSelenium:
base_url = "https://sc.chinaz.com/" # 采集的网址
save_path = "D:\\Freedom\\Sprider\\ChinaZ\\"
sprider_count = 88 # 116+66+20
sprider_start_count = 0
word_content_list = []
folder_name = ""
page_end_number = 0
max_pager = 24 # 每页的数量
haved_sprider_count = 0 # 已经采集的数量
page_count = 1 # 每个栏目开始业务content="text/html; charset=gb2312"
filter_down_file = []
word_image_count = 5 # word插入图片数量 同时也是明细采集图片和描述的数量
sprider_detail_index = 0 # 明细方法采集的数量 累加
sprider_top_level = "HTML"
Design 个性模板
BA 简实模板
简实模板
DG 个性模板
NEOBIZ 个性模板
LG 个性模板
Art 个性模板
Esens 简实模板
FXstyle 个性模板
1030Love 爱的小屋
FXstyle 简实模板
Designload 人才模板
Designload 简实模板
1030Love 灰色个性
FXstyle 简实模板
1030Love 设计梦想
1030Love 黄金年华
1030Love 红色恋人
1030Love 绿色爱情
1030Love 设计感觉
1030Love 时尚服饰
1030Love 视觉设计
1030Love 个人主页
1030Love古色古香
1030Love 绿色梦想
1030Love 艺术人生
1030Love 蓝天年代
1030Love 酷模版
1030Love 平凡的叶子
1030Love 酷模版之COOL
def sprider(self, title_name):
"""
采集
医疗保健 https://sc.chinaz.com/moban/YiLiaoBaoJian.html
电子产品 https://sc.chinaz.com/moban/DianZiChanPin.html
电子商务 https://sc.chinaz.com/moban/DianZiShangWu.html
婚纱模板 https://sc.chinaz.com/moban/HunShaMoBan.html
电脑主机 https://sc.chinaz.com/moban/DianNaoZhuJi.html
旅游交通 https://sc.chinaz.com/moban/LvYouJiaoTong.html
体育竞技 https://sc.chinaz.com/moban/TiYuJingJi.html
娱乐休闲 https://sc.chinaz.com/moban/YuLeXiuXian.html
艺术时尚 https://sc.chinaz.com/moban/YiShuShiShang.html
建筑风光 https://sc.chinaz.com/moban/JianZhuFengGuang.html
动植食物 https://sc.chinaz.com/moban/DongZhiShiWu.html
人物家庭 https://sc.chinaz.com/moban/RenWuJiaTing.html
社会教育 https://sc.chinaz.com/moban/SheHuiJiaoYu.html
公司企业 https://sc.chinaz.com/moban/GongSiQiYe.html
:return:
"""
if title_name == "医疗保健":
self.first_column_name = "moban"
self.folder_name = "HTML医疗保健模板"
self.second_column_name = "YiLiaoBaoJian"
elif title_name == "公司企业":
self.first_column_name = "moban"
self.folder_name = "HTML公司企业模板"
self.second_column_name = "GongSiQiYe"
elif title_name == "社会教育":
self.first_column_name = "moban"
self.folder_name = "HTML社会教育模板"
self.second_column_name = "SheHuiJiaoYu"
elif title_name == "动植食物":
self.first_column_name = "moban"
self.folder_name = "HTML动植食物模板"
self.second_column_name = "DongZhiShiWu"
elif title_name == "人物家庭":
self.first_column_name = "moban"
self.folder_name = "HTML人物家庭模板"
self.second_column_name = "RenWuJiaTing"
elif title_name == "建筑风光":
self.first_column_name = "moban"
self.folder_name = "HTML建筑风光模板"
self.second_column_name = "JianZhuFengGuang"
elif title_name == "艺术时尚":
self.first_column_name = "moban"
self.folder_name = "HTML艺术时尚模板"
self.second_column_name = "YiShuShiShang"
elif title_name == "娱乐休闲":
self.first_column_name = "moban"
self.folder_name = "HTML娱乐休闲模板"
self.second_column_name = "YuLeXiuXian"
elif title_name == "体育竞技":
self.first_column_name = "moban"
self.folder_name = "HTML体育竞技模板"
self.second_column_name = "TiYuJingJi"
elif title_name == "旅游交通":
self.first_column_name = "moban"
self.folder_name = "HTML旅游交通模板"
self.second_column_name = "LvYouJiaoTong"
elif title_name == "电脑主机":
self.first_column_name = "moban"
self.folder_name = "HTML电脑主机模板"
self.second_column_name = "DianNaoZhuJi"
elif title_name == "电子产品":
self.first_column_name = "moban"
self.folder_name = "HTML电子产品模板"
self.second_column_name = "DianZiChanPin"
elif title_name == "电子商务":
self.first_column_name = "moban"
self.folder_name = "HTML电子商务模板"
self.second_column_name = "DianZiShangWu"
BaseFrame().right("本次采集参数:日志路径:" + str(BaseFrame().LOG_PATH) + "")
BaseFrame().right("本次采集参数:sprider_count=" + str(self.sprider_count) + "")
BaseFrame().right("本次采集参数:title_name=" + title_name + "")
BaseFrame().right("本次采集参数:second_column_name=" + self.second_column_name + "")
# self.folder_name = "JS表单验证"
self.sprider_category = title_name # 一级目录self.folder_name
second_folder_name = str(self.sprider_count) + "个" + self.folder_name # 二级目录
self.sprider_type = second_folder_name
self.merchant = int(self.sprider_start_count) // int(self.max_pager) + 1 # 起始页码用于效率采集
# 原始路径+一级目录+二级目录
self.file_path = self.save_path + os.sep + self.sprider_top_level + os.sep + self.folder_name + os.sep + second_folder_name
self.save_path = self.save_path + os.sep + self.sprider_top_level + os.sep + self.folder_name + os.sep + second_folder_name + os.sep + self.folder_name
BaseFrame().debug("开始采集ChinaZJL" + self.folder_name + "...")
sprider_url = (self.base_url + "/{1}/{0}.html".format(self.second_column_name, self.first_column_name))
down_path = "D:\\Freedom\\Sprider\\ChinaZ\\" + self.sprider_top_level + "\\" + self.folder_name + "\\" + second_folder_name + "\\Temp\\"
if os.path.exists(down_path) is True:
shutil.rmtree(down_path)
if os.path.exists(down_path) is False:
os.makedirs(down_path)
if os.path.exists(self.save_path) is True:
shutil.rmtree(self.save_path)
if os.path.exists(self.save_path) is False:
os.makedirs(self.save_path)
chrome_options = webdriver.ChromeOptions()
diy_prefs = {'profile.default_content_settings.popups': 0,
'download.default_directory': '{0}'.format(down_path)}
# 添加路径到selenium配置中
chrome_options.add_experimental_option('prefs', diy_prefs)
chrome_options.add_argument('--headless') # 隐藏浏览器
# 实例化chrome浏览器时,关联忽略证书错误
driver = webdriver.Chrome(options=chrome_options)
driver.set_window_size(1280, 800) # 分辨率 1280*800
#
BaseFrame().debug("开始采集" + sprider_url)
driver.get(sprider_url)
# content = driver.page_source
element_list = driver.find_elements(By.CLASS_NAME, "masonry-brick") # 列表页面 核心内容 box col3 ws_block masonry-brick
# element_list = div_elem.find_elements(By.CLASS_NAME, 'item')
# print(element_list.get_attribute('innerHTML'))
laster_pager_div = driver.find_element(By.CLASS_NAME, "fenye")
laster_pager_a = laster_pager_div.find_elements(By.TAG_NAME, 'a')
laster_pager_url = laster_pager_a[len(laster_pager_a) - 2]
page_end_number = int(laster_pager_url.text)
self.page_count = self.merchant
while self.page_count <= int(page_end_number): # 翻完停止
try:
if self.page_count == 1:
self.sprider_detail(driver, element_list, self.page_count, page_end_number, down_path)
pass
else:
if self.haved_sprider_count == self.sprider_count:
BaseFrame().debug("采集到达数量采集停止...")
BaseFrame().debug("开始写文章...")
self.builder_word(self.folder_name, self.word_content_list)
BaseFrame().debug("文件编写完毕,请到对应的磁盘查看word文件和下载文件!")
break
# (self.base_url + "/sort/{0}/{1}/".format(url_index, self.page_count))
# http://soft.onlinedown.net/sort/177/2/
# https://sc.chinaz.com//jianli/xiaochengchu_2.html
next_url = self.base_url + "/{2}/{0}_{1}.html".format(self.second_column_name, self.page_count,
self.first_column_name)
driver.get(next_url)
element_list = driver.find_elements(By.CLASS_NAME, "masonry-brick") # 列表页面 核心内容
self.sprider_detail(driver, element_list, self.page_count, page_end_number, down_path)
pass
# print(self.page_count)
self.page_count = self.page_count + 1 # 页码增加1
except Exception as e:
print("sprider()执行过程出现错误:" + str(e))
sleep(1)
1030Love 工作室
1030Love 故事
1030Love 标志
1030Love 思念
1030Love 美丽新世界
1030Love 静心堂
1030Love 没有你的日子
1030Love 互动力量
FXstyle 公司模板
DesignEmpire 个性模板
DesignEmpire 简实模板
Designload 个性模板
ThemeGallery个性模板
Freegine 简实模板
Aplustemplates 白马模板
InstantCoffee 简实模板
Aplustemplates 简实模板
InstantCoffee 卡通模板
import os
import shutil
def void_folder(path):
# 访问path路径下的文件或文件夹
lst = os.listdir(path)
# 打印每一层的文件或文件夹
for name in lst:
# 拼接名称,得到绝对路径,判断该文件是否符合是文件夹
real_path = os.path.join(path, name)
# 如果是文件夹,则打空格表示,并且递归访问下一层
if os.path.isdir(real_path):
# print(name)
files = os.listdir(real_path)
if len(files) == 0:
print("void_folder():"+name)
shutil.rmtree(real_path)
endindex = len(real_path) - len(name)
real_path = real_path[0:endindex]
void_folder(real_path)
else:
void_folder(real_path)
# 如果不是文件夹,直接打印,不再递归访问下一层
else:
#print(name)
pass
def void_file(dirPath):
dirs = os.listdir(dirPath) # 查找该层文件夹下所有的文件及文件夹,返回列表
for file in dirs:
file_full_name = dirPath + '/' + file
file_ext = os.path.splitext(file_full_name)[-1]
if file_ext is None or file_ext=="":
continue
if "rar" == str(file_ext.split(".")[1]):
os.remove(file_full_name)
if "zip" == str(file_ext.split(".")[1]):
os.remove(file_full_name)
if "gz" == str(file_ext.split(".")[1]):
os.remove(file_full_name)
if "tgz" == str(file_ext.split(".")[1]):
os.remove(file_full_name)
# 查找指定文件夹下所有相同名称的文件
def search_file(dirPath, fileName):
dirs = os.listdir(dirPath) # 查找该层文件夹下所有的文件及文件夹,返回列表
for currentFile in dirs: # 遍历列表
absPath = dirPath + '/' + currentFile
if os.path.isdir(absPath): # 如果是目录则递归,继续查找该目录下的文件
search_file(absPath, fileName)
elif currentFile == fileName:
#print(absPath) # 文件存在,则打印该文件的绝对路径
os.remove(absPath)
a1webtemplates 个性模板
Freegine 个性模板
templatespace 个性模板
DesignEmpire LOGO模板
Art 简实模板
InstantCoffee 个性模板
InstantCoffee 书模板
templatespace 公司模板
Helendesign 个性模板
Aplustemplates 其他模板
Helendesign 施工模板
Liquid2d 简实模板
Liquid2d 个性模板
Aplustemplates 个性模板
Templatesdd 个性模板
欧美公司蓝紫模板
欧美个性模板
欧美公司个性模板
女生个性网站模板
最后送大家一首诗:
山高路远坑深,
大军纵横驰奔,
谁敢横刀立马?
惟有点赞加关注大军。