PHP源码
分享81个PHP源码,总有一款适合您
下面是文件的名字,我放了一些图片,文章里不是所有的图主要是放不下...,
81个PHP源码下载链接:https://pan.baidu.com/s/18jo0nrQ6tCf-e1PAylItmQ?pwd=3rxz
提取码:3rxz
Python采集代码下载链接:采集代码.zip - 蓝奏云
PHPBlast Fourms v3.3.0 BIG5
PHPBlast Fourms v3.3.0 gbk
MyCOM企业网站管理系统 v1.0 Build080926 alpha
sarticle文章系统小猪会气功修改版(二级分类)
MyPic (七夜图片管理系统) v1.2
IP读取与显示 v1.0 Php版
ULCms v1.0 RC Build 20080926
极端JDCMS v1.0.5 GB
KubeBlog v1.1.2 汉化版
Google Sitemap生成器 v3.0 for phpwind6.3.2
ClickLab鼠标点击行为分析系统 v1.01
泮泡网新闻文章心情投票 (AJAX无刷新PHP版)
新浪博客网页在线编辑器PHP版带图片上传
MyLog 小鱼日志 v1.1
Menalto Gallery v2.2.6 多国语言版
phpSQLiteAdmin v0.3 Alpha1
hahaCMS v1.0
NetPb网上党支部系统 v1.01
DomainGen自助停放 v1.0.0
MediPro乡镇政府门户网站系统 v5.1.0 UTF-8简体中文版
MediPro汽车门户网站系统 v5.1.0 UTF-8简体中文版
基于Ajax的php开源留言板
MYSQL5 LOG 分析工具
麒麟积分下载系统 v1.0 Beta4
BTMaster BT发布索引系统 v1.3.4 bulid 080906
compager v0.1 beta build 20081106
ShopEx481 & PHPWind632 整合版
web link validator
落伍PHP分类系统 v1.0 正式版
网锐内容管理系统(WRCMS) v1.1.0 RC1
Textcube v1.7.6 多语言版
仿163网盘无刷新文件上传 for Php
wtag v1.0 Beta
falt4 extreme RC4
Wallpaper Script v2.04
功能比较强的一款在线FLV视频播放器
Pro Chat Rooms v3.0.2
Mambo v4.6.5
绘图留言本
生成英文火星字的小程序
chat-book
snews v1.7 中文版
orbitphpchatter v0.1b4版
CSS精简优化工具 v1.0
圣者文章管理系统 SWCms v2.0.1
Crossday Discuz! Board 论坛系统Discuz! v7.0 测试版 GBK
JeCat-Jabber PHP开源即时通讯软件 v0.1.2 bulid 081103
(开源PHP框架) CodeIgniter v1.7.0
import os import shutil import time from time import sleep import requests from bs4 import BeautifulSoup 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 class HuaJunCode: base_url = "https://down.chinaz.com" # 采集的网址 save_path = "D:\\Freedom\\Sprider\\ChinaZ\\" sprider_count = 95 # 采集数量 sprider_start_count=5296# word_content_list = [] folder_name = "" page_end_number=0 max_pager=15 #每页的数量 haved_sprider_count =0 # 已经采集的数量 page_count = 1 # 每个栏目开始业务content="text/html; charset=gb2312" filter_down_file=[] def __init__(self): pass def sprider(self,title_name="NET"): """ 采集 PHP https://down.chinaz.com/class/572_5_1.htm NET https://down.chinaz.com/class/572_4_1.htm ASP https://down.chinaz.com/class/572_3_1.htm Python https://down.chinaz.com/class/604_572_1.htm https://down.chinaz.com/class/608_572_1.htm 微信 https://down.chinaz.com/class/610_572_1.htm Ruby https://down.chinaz.com/class/622_572_1.htm NodeJs https://down.chinaz.com/class/626_572_1.htm C https://down.chinaz.com/class/594_572_1.htm :return: """ if title_name == "PHP": self.folder_name = "PHP源码" self.second_column_name = "572_5" elif title_name == "Go": self.folder_name = "Go源码" self.second_column_name = "606_572" elif title_name == "NET": self.folder_name = "NET源码" self.second_column_name = "572_4" elif title_name == "ASP": self.folder_name = "ASP源码" self.second_column_name = "572_3" elif title_name == "Python": self.folder_name = "Python源码" self.second_column_name = "604_572" elif title_name == "JavaScript": self.folder_name = "JavaScript源码" self.second_column_name = "602_572" elif title_name == "Java": self.folder_name = "Java源码" self.second_column_name = "572_517" elif title_name == "HTML": self.folder_name = "HTML-CSS源码" self.second_column_name = "608_572" elif title_name == "TypeScript": self.folder_name = "TypeScript源码" self.second_column_name = "772_572" elif title_name == "微信小程序": self.folder_name = "微信小程序源码" self.second_column_name = "610_572" elif title_name == "Ruby": self.folder_name = "Ruby源码" self.second_column_name = "622_572" elif title_name == "NodeJs": self.folder_name = "NodeJs源码" self.second_column_name = "626_572" elif title_name == "C++": self.folder_name = "C++源码" self.second_column_name = "596_572" elif title_name == "C": self.folder_name = "C源码" self.second_column_name = "594_572" #https://down.chinaz.com/class/594_572_1.htm first_column_name = title_name # 一级目录 self.sprider_category = title_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 + "Code" + os.sep + first_column_name + os.sep + second_folder_name self.save_path = self.save_path+ os.sep + "Code" + os.sep+first_column_name+os.sep + second_folder_name+ os.sep + self.folder_name BaseFrame().debug("开始采集ChinaZCode"+self.folder_name+"...") sprider_url = (self.base_url + "/class/{0}_1.htm".format(self.second_column_name)) down_path="D:\\Freedom\\Sprider\\ChinaZ\\Code\\"+first_column_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 # driver.get方法将定位在给定的URL的网页,get接受url可以是任何网址,此处以百度为例 driver.get(sprider_url) # content = driver.page_source # print(content) div_elem = driver.find_element(By.CLASS_NAME, "main") # 列表页面 核心内容 element_list = div_elem.find_elements(By.CLASS_NAME, 'item') laster_pager_ul = driver.find_element(By.CLASS_NAME, "el-pager") laster_pager_li =laster_pager_ul.find_elements(By.CLASS_NAME, 'number') laster_pager_url = laster_pager_li[len(laster_pager_li) - 1] 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/ next_url = self.base_url + "/class/{0}_{1}.htm".format(self.second_column_name, self.page_count) driver.get(next_url) div_elem = driver.find_element(By.CLASS_NAME, "main") # 列表页面 核心内容 element_list = div_elem.find_elements(By.CLASS_NAME, 'item') 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) def sprider_detail(self, driver,element_list,page_count,max_page,down_path): """ 采集明细页面 :param driver: :param element_list: :param page_count: :param max_page: :param down_path: :return: """ index = 0 element_array=[] element_length=len(element_list) for element in element_list: url_A_obj = element.find_element(By.CLASS_NAME, 'name-text') next_url = url_A_obj.get_attribute("href") coder_title = url_A_obj.get_attribute("title") e=coder_title+"$"+ next_url element_array.append(e) pass if int(self.page_count) == int(self.merchant): self.sprider_start_index = int(self.sprider_start_count) % int(self.max_pager) index=self.sprider_start_index while index < element_length: if os.path.exists(down_path) is False: os.makedirs(down_path) if self.haved_sprider_count == self.sprider_count: BaseFrame().debug("采集到达数量采集停止...") break #element = element_list[index] element=element_array[index] time.sleep(1) index = index + 1 sprider_info="正在采集第"+str(page_count)+"页的第"+str(index)+"个资源,共"+str(max_page)+"页资源" BaseFrame().debug(sprider_info) next_url=element.split("$")[1] coder_title=element.split("$")[0] # next_url = element.find_element(By.TAG_NAME, 'a').get_attribute("href") # coder_title =element.find_element(By.TAG_NAME, 'img').get_attribute("title") driver.get(next_url) # 请求明细页面 try: codeEntity = SpriderEntity() # 下载过的资源不再下载 codeEntity.sprider_base_url = self.base_url codeEntity.create_datetime = SpriderTools.get_current_datetime() codeEntity.sprider_url = next_url codeEntity.sprider_pic_title = coder_title codeEntity.sprider_pic_index = str(index) codeEntity.sprider_pager_index = page_count codeEntity.sprider_type = self.sprider_type if SpriderAccess().query_sprider_entity_by_urlandindex(next_url, str(index)) is None: SpriderAccess().save_sprider(codeEntity) else: BaseFrame().debug(coder_title+next_url + "数据采集过因此跳过") continue if SeleniumTools.judeg_element_isexist(driver, "CLASS_NAME", "download-item") == 3: driver.back() BaseFrame().debug(coder_title+"不存在源码是soft因此跳过哦....") continue print("准备点击下载按钮...") driver.find_element(By.CLASS_NAME, "download-item").click() #下载源码 sleep(1) result,message=SpriderTools.judge_file_exist(True,240,1,down_path,"zip|rar|gz|tgz")#判断源码 if result is True: sprider_content = [coder_title, self.save_path + os.sep +"image"+ os.sep + coder_title + ".jpg"] # 采集成功的记录 self.word_content_list.append(sprider_content) # 增加到最终的数组 self.haved_sprider_count = self.haved_sprider_count + 1 BaseFrame().debug("已经采集完成第" + str(self.haved_sprider_count) + "个") time.sleep(1) driver.back() coder_title = str(coder_title).replace("/", "") #去掉windows不识别的字符 files = os.listdir(down_path) file_name = files[0] #获取默认值 if len(self.filter_down_file)>0: for file in files: for filter_file in self.filter_down_file: if str(file) in str(filter_file): BaseFrame().error(filter_file + "文件被过滤...") pass else: file_name = file srcFile = down_path + os.sep + file_name file_ext = os.path.splitext(srcFile)[-1] dstFile = down_path + os.sep + coder_title + file_ext os.rename(srcFile, dstFile) srcFile = dstFile dstFile = self.save_path + os.sep + coder_title + file_ext shutil.move(srcFile, dstFile) # 移动文件 else: files = os.listdir(down_path) # 读取目录下所有文件 coder_title = str(coder_title).replace("/", "") # 去掉windows不识别的字符 try: if str(message)=="0个文件认定是False": BaseFrame().error(coder_title+"文件不存在...") shutil.rmtree(down_path) # 如果没下载完是无法删除的 pass else: BaseFrame().error("检测下载文件出错可能原因是等待时间不够已经超时,再等待60秒...") time.sleep(60) shutil.rmtree(down_path) #如果没下载完是无法删除的 #清空数组 self.filter_down_file.clear() except Exception as e: # 使用数组append记录文件名字 移动的时候过滤 self.builder_filter_file(files) pass except Exception as e: BaseFrame().error("sprider_detail()执行过程出现错误:" + str(e)) BaseFrame().error("sprider_detail()记录下载的文件名") # 使用数组append记录文件名字 移动的时候过滤 files = os.listdir(down_path) # 读取目录下所有文件 self.builder_filter_file(files) if(int(page_count)==int(max_page)): self.builder_word(self.folder_name,self.word_content_list) BaseFrame().debug("文件编写完毕,请到对应的磁盘查看word文件和下载文件!")
JJ.API v0.1.0
GoogChart v0.1
网页游戏斗地主onWeb v2008 build 1005
人品测试完整版 v1.0
phparticle v2.3 简体中文版
Phpgrid v2.1 Alpha
acid v1.4.4
PHP无限分类程序 v1.0
DiY-Page自定制系统 v5.3.1 bulid 081025
Phormer v3.31
php 汉字转拼音
fuzzylime cms v3.03
WebShare WebFTP v0.6.5 beta
一句话英语 v1.0
网页游戏五子棋onWeb v2008
NetGou商城购物系统 v3.3 开源版
MyPHP Forum v3.0 Final
Brim v2.0.0
boastMachine v3.1
O-Blog v2.6 build 080705 简体中文正式版
冰雪CMS v2.0 bulid 081020
QQ群聊天网友发言数排行查询 v1.0
T5566优酷视频小偷(php) bulid 081020
.htaccess Editor:htaccess在线生成器 今天不聊天收藏版
杰奇wap小说系统 v1.40
php168 2008全功能版整站系统
SablogX v1.6 相册 v1.1
项目管理程序 Collabtive v0.4.8 汉化版
项目管理程序 Collabtive v0.4.8 英文版
项目管理程序 Collabtive v0.4.8 汉化版
Pligg v9.9.5 Beta
162100静态(论坛/文章)系统 v2.4
Easy Reflections v3.0
SupeV v1.0.1 简体中文 UTF8
SupeV v1.0.1 简体中文 GBK
Flash小游戏小偷 v1.0
动网论坛PHP版 v2.0++ Build 081009
杰奇网站管理系统 JIEQI CMS v1.5 免费版
KubeSupport客户支持中心 v0.9.0 汉化版
SUN2008 企业网站管理系统 v2.0 beta
Modoer多功能点评系统 v1.0.2 bulid 080928 UTF-8
Modoer多功能点评系统 v1.0.2 bulid 080928 GBK
蓝梦图片管理系统-lmcms v3.5 bulid 081006
Mini File Host v1.5 汉化版
Mini File Host v1.5
IXNA聚合程序 v0.5 Build 20080729 测试版
发发通b2b电子商务系统 v1.0 beta
import os # 查找指定文件夹下所有相同名称的文件 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)
最后送大家一首诗:
山高路远坑深,
大军纵横驰奔,
谁敢横刀立马?
惟有点赞加关注大军。