分享77个PHP江湖论坛源码,总有一款适合您
77个PHP江湖论坛源码下载链接:https://pan.baidu.com/s/1dLuixhvCs4Pp27BU6pJq6Q?pwd=1d2o
提取码:1d2o
Python采集代码下载链接:采集代码.zip - 蓝奏云
我的博客地址:亚丁号-知识付费平台 支付后可见 扫码付费可见
import os
import shutilimport requests
from bs4 import BeautifulSoupfrom framework.base.BaseFrame import BaseFrame
from sprider.access.SpriderAccess import SpriderAccess
from sprider.plugin.SpriderTools import SpriderTools
from sprider.plugin.UserAgent import UserAgent
class CNSourceCoder:
base_url = "http://www.downcode.com" max_pager = 10 # 每页的数量 影响再次采集的起始位置.
word_image_count = 5 # word插入图片数量 同时也是明细采集图片和描述的数量 page_end_number = 0
word_content_list = []
haved_sprider_count = 0 # 已经采集的数量
sprider_detail_index = 0 # 明细方法采集的数量 累加
网页斗地主插件 For Discuz V2sp3
Youbbs For Bae V1.51
Discuz! X2.5 繁体中文 UTF8 R20130426
Discuz! X2.5 繁体中文BIG5 R20130426
Discuz! X2.5 简体中文 UTF8 R20130426
Discuz! X2.5 简体中文GBK R20130426
仿花瓣网模板 For Thinksns V2.8.1
MiniBB V3.0.1
PWind V9.0 正式版 UTF8 Build20130227
PHPWind V9.0 正式版 GBK Build20130227
162100截图程序 V4.1
SMF论坛(Simple Machines Forum) 2.0.4 繁体中文版
MySmartBB V2.0 正式版
简洁贴吧分享盈利系统 V1.2
UseBB 简易论坛源码 V1.0.16
WiiBBS(手机WAP论坛系统) V4.5
YouBBS V1.04
YiCms糗事百科 V2.0免费版
PhpFox社交程序 V3.4.1
雨中漫步WAP贴吧 V2.2
MyBB V1.6.8 简体中文版
Mahara 社交网站系统 V1.6.0
开源论坛系统FUDforum V3.0.4.1
BbPress V2.1.2
THINKSNS2.8小游戏应用 V1.0
Phorum V5.2.19 For Windows
多彩贴吧(Phpcolor) V3.3 GBK
162100简洁论坛系统 V1.2
PHP仿Pinterest图谱程序花瓣模板 V2.3.1
Dzz!云桌面 For Discuz V1.2 UTF8 Build20120521
Dzz!云桌面 For Discuz V1.2 GBK Build20120521
泥人论坛 新浪SAE版 V1.0 Beta2
AppCan-BBS For Discuz! X2.0&2.5 V2.2
Dzz云桌面 For Discuz V1.2 UTF8 Build 20120504
Dzz云桌面 For Discuz V1.1 GBK Build 0824
Phpwind游戏插件 V1.4 GBK
BidCms图片分享系统Pinterest V2.0
Discuz! X2 R20120329 简体UTF-8
Discuz! X2 R20120329 简体GBK
Discuz! X2 R20120329 繁体UTF-8
Discuz! X2 R20120329 繁体BIG5
Project Goldenfaith V2012
AppCan-BBS V2.2 For Discuz!X2
Punbb V1.4.2
SMF论坛 Simple Machines Forum V2.02
MiniBB V3.0 中文版
FluxBB V1.4.8
MIMVICbbs V0.9.9 For Php5.2
Discuz! X1.5.1 繁体UTF8 R20111221
Discuz! X1.5.1 繁体BIG5 R20111221
Discuz! X1.5.1 简体UTF-8 R20111221
Discuz! X1.5.1 简体GBK R20111221
def sprider(self,sprider_name,sprider_count,start_number,
pager_number,sprider_type,is_show_browse,root_path,
first_column_name,second_column_name,is_record_db):
"""
http://www.downcode.com/sort/j_1_2_1.shtml
:param sprider_name:
:return:
"""
self.first_folder_name=sprider_type.upper()
self.base_path=root_path
self.first_column_name = first_column_name
self.second_column_name = second_column_name
self.sprider_start_count=start_number
self.is_record_db=is_record_db
BaseFrame().debug("开始采集[源码下载站]" + self.first_folder_name + "源码...")
BaseFrame().right("本次采集参数:sprider_count(采集数量):" + str(sprider_count) + "")
BaseFrame().right("本次采集参数:sprider_name(采集名称):" + sprider_name + "")
sprider_url = self.base_url + "/{0}/{1}_1.shtml".format(self.first_column_name, self.second_column_name)# 根据栏目构建URL
BaseFrame().debug("本次采集参数:sprider_url:" + sprider_url) self.second_folder_name = str(sprider_count) + "个" + sprider_name # 二级目录也是wordTitle
self.merchant = int(self.sprider_start_count) // int(self.max_pager) + 1 # 起始页码用于效率采集
self.file_path = self.base_path + os.sep + self.first_folder_name + os.sep + self.second_folder_name
BaseFrame().right("本次采集参数:file_path=" + self.file_path + "")
# 浏览器的下载路径
self.down_path = self.base_path + os.sep + self.first_folder_name+ os.sep + self.second_folder_name+ "\\Temp\\"
BaseFrame().right("本次采集参数:down_path=" + self.down_path + "")
# First/PPT/88个动态PPT模板/动态PPT模板
self.save_path = self.base_path + os.sep + self.first_folder_name + os.sep + self.second_folder_name + os.sep + sprider_name
BaseFrame().right("本次采集参数:save_path=" + self.save_path + "")
if os.path.exists(self.down_path) is True:
shutil.rmtree(self.down_path)
if os.path.exists(self.down_path) is False:
os.makedirs(self.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)
response = requests.get(sprider_url, timeout=10, headers=UserAgent().get_random_header(self.base_url))
response.encoding = 'gb2312'
soup = BeautifulSoup(response.text, "html5lib")
#print(soup)
element_list = soup.find_all('div', attrs={"class": 'j_text_sort_a'})
page_end_number = 1
page_end_url = ""
page_end_title = soup.find("a", attrs={"title": '最后页'})
page_end_url = page_end_title.get("href")
if page_end_url is None or page_end_url == "":
page_end_number = 1
else:
page_end_number = (page_end_url.split(".shtml")[0].split("_")[3]) self.page_count = self.merchant while self.page_count <= int(page_end_number): # 翻完停止
try:
if self.page_count == 1:
self.sprider_detail(element_list, page_end_number,sprider_count)
pass
else:
if int(self.haved_sprider_count) == int(sprider_count):
BaseFrame().debug("sprider采集到达数量采集停止...")
BaseFrame().debug("开始写文章...")
SpriderTools.builder_word(self.second_folder_name,
self.word_content_list,
self.file_path,
self.word_image_count,
self.first_folder_name)
SpriderTools.copy_file(self.word_content_list,
self.save_path,
self.second_folder_name,
self.file_path)
SpriderTools.gen_passandtxt(self.second_folder_name, self.word_content_list, self.file_path)
BaseFrame().debug("文件编写完毕,请到对应的磁盘查看word文件和下载文件!")
break
next_url = self.base_url + "/{0}/{1}_{2}.shtml".format(self.first_column_name,
self.second_column_name,
self.page_count) response = requests.get(next_url, timeout=10, headers=UserAgent().get_random_header(self.base_url))
response.encoding = 'gb2312'
soup = BeautifulSoup(response.text, "html5lib")
element_list = soup.find_all('div', attrs={"class": 'j_text_sort_a'})
self.sprider_detail(element_list, page_end_number,sprider_count)
pass
self.page_count = self.page_count + 1 # 页码增加1
except Exception as e:
BaseFrame().error("sprider()执行过程出现错误:" + str(e))
Letutao购物分享社区(社区化分享系统) V1.6
Gnuboard V4.34.16 Utf-8 中文版
BMForum Myna V6.01
PHPWind V8.7 Build 1111 BIG5
PHPWind V8.7 Build 1111 UTF-8
PHPWind V8.7 Build 1111 GBK
XMBForum V1.9.11.12
Vanilla 论坛 V2.0.18.1
MyLittleForum 2.3
公告板系统 KaiBB V2.0.1
HDWiki V5.1 GBK 正式版
多彩贴吧PhpColor单贴吧版 V1.1
云聊 V2.1 For PHPWIND8.5 UTF-8
云聊 V2.1 For PHPWIND8.5 GBK
ThinkSAAS开源小组 V0.9极速版
Dolphin V7.0.6 简体中文语言包 V1.0.3
Discuz! V7.2 Bulid 20100628 全英文版本 独立安装包
Phpwind帐号通 V1.1
Discuz! X2 简体UTF-8 RC Build 20110505
UCenter V1.6 简体GBK Build 20110505
UCenter V1.6 简体UTF-8 Build 20110505
UCenter V1.6 繁体UTF-8 Build 20110505
UCenter V1.6 繁体BIG5 Build 20110505
XpressEngine(Zeroboard XE) V1.4.5.4 多国语言
Dzx1.5 发号插件 V1.3
最后送大家一首诗:
山高路远坑深,
大军纵横驰奔,
谁敢横刀立马?
惟有点赞加关注大军。
发表评论 取消回复