当前位置:首页>python>安全合规的Python网页爬虫:设计、实现与最佳实践

安全合规的Python网页爬虫:设计、实现与最佳实践

  • 2026-04-20 00:54:48
安全合规的Python网页爬虫:设计、实现与最佳实践

在网络安全领域,批量网页爬取是一项重要的技术能力,可用于信息收集、漏洞扫描、威胁情报获取等多种场景。然而,不当的爬取行为可能违反法律法规或目标网站的使用条款,甚至构成网络攻击。

1.1 合法性与合规性

  • • 遵守《网络安全法》和《数据安全法》
  • • 尊重目标网站的robots.txt协议
  • • 控制爬取频率,避免对目标网站造成DDoS效果
  • • 仅爬取公开可访问的数据,不尝试绕过访问控制

1.2 反爬虫机制应对

  • • 用户代理(User-Agent)轮换
  • • 请求间隔随机化
  • • IP代理池使用
  • • 验证码识别与处理
  • • JavaScript渲染页面处理

1.3 数据安全与隐私保护

  • • 爬取数据加密存储
  • • 敏感信息脱敏处理
  • • 访问日志完整记录
  • • 数据使用范围限定

二、批量网页爬取脚本核心架构

2.1 系统架构设计

+-------------------+     +-------------------+     +-------------------+|   请求调度模块    |---->|   请求执行模块    |---->|   数据处理模块    |+-------------------+     +-------------------+     +-------------------+        ↑                         ↑                         ↑        |                         |                         |+-------------------+     +-------------------+     +-------------------+|   目标管理模块    |     |   代理管理模块    |     |   存储管理模块    |+-------------------+     +-------------------+     +-------------------+

2.2 关键组件说明

  1. 1. 目标管理模块:管理待爬取URL列表,支持批量导入和去重
  2. 2. 请求调度模块:控制爬取节奏,实现流量整形
  3. 3. 请求执行模块:实际发送HTTP请求,处理各种反爬机制
  4. 4. 数据处理模块:解析响应内容,提取所需数据
  5. 5. 代理管理模块:维护代理IP池,实现IP轮换
  6. 6. 存储管理模块:安全存储爬取结果

三、完整代码实现与详细解析

3.1 基础爬取框架实现

import requestsfrom urllib.parse import urljoin, urlparsefrom bs4 import BeautifulSoupimport timeimport randomimport csvfrom fake_useragent import UserAgentimport loggingfrom datetime import datetimeimport hashlibimport jsonfrom typing importListDictOptional# 配置日志logging.basicConfig(    level=logging.INFO,format='%(asctime)s - %(levelname)s - %(message)s',    handlers=[        logging.FileHandler('web_crawler.log'),        logging.StreamHandler()    ])logger = logging.getLogger(__name__)classWebCrawler:def__init__(self, base_url: str, max_depth: int = 2, delay_range: tuple = (13)):"""        初始化爬虫        :param base_url: 起始URL        :param max_depth: 最大爬取深度        :param delay_range: 请求间隔范围(秒)        """self.base_url = base_urlself.max_depth = max_depthself.delay_range = delay_rangeself.visited_urls = set()self.ua = UserAgent()self.session = requests.Session()self.session.headers.update({'User-Agent'self.ua.random})# 初始化存储self.results = []self.error_logs = []# 安全相关配置self.allowed_domains = {urlparse(base_url).netloc}self.robots_txt_checked = Falsedef_check_robots_txt(self) -> bool:"""检查robots.txt协议"""        robots_url = urljoin(self.base_url, '/robots.txt')try:            response = self.session.get(                robots_url,                 timeout=10,                headers={'User-Agent'self.ua.random}            )if response.status_code == 200:# 简单检查是否允许爬取# 实际应用中应解析robots.txt内容return"Disallow: /"notin response.textreturnTrueexcept Exception as e:            logger.warning(f"Failed to check robots.txt: {e}")returnTruedef_is_allowed_domain(self, url: str) -> bool:"""检查URL是否属于允许的域名"""        parsed = urlparse(url)return parsed.netloc inself.allowed_domainsdef_get_random_delay(self) -> float:"""获取随机延迟时间"""return random.uniform(*self.delay_range)def_normalize_url(self, url: str) -> str:"""标准化URL"""        parsed = urlparse(url)# 移除URL中的片段标识符和查询参数        clean_url = parsed._replace(fragment='', query='').geturl()return clean_urldef_extract_links(self, html: str, base_url: str) -> List[str]:"""从HTML中提取所有链接"""        soup = BeautifulSoup(html, 'html.parser')        links = set()for a_tag in soup.find_all('a', href=True):            href = a_tag['href'].strip()if href.startswith('#'):continue# 跳过片段标识符            absolute_url = urljoin(base_url, href)ifself._is_allowed_domain(absolute_url):                links.add(self._normalize_url(absolute_url))returnlist(links)def_fetch_page(self, url: str) -> Optional[Dict]:"""获取网页内容"""try:            time.sleep(self._get_random_delay())            response = self.session.get(                url,                timeout=15,                headers={'User-Agent'self.ua.random}            )# 检查响应状态码if response.status_code == 200:                content_type = response.headers.get('content-type''')# 只处理HTML内容if'text/html'in content_type:return {'url': url,'status_code': response.status_code,'html': response.text,'timestamp': datetime.now().isoformat()                    }else:                    logger.info(f"Non-HTML content found at {url}")else:                logger.warning(f"Failed to fetch {url}, status code: {response.status_code}")except requests.exceptions.RequestException as e:            error_msg = f"Error fetching {url}{str(e)}"            logger.error(error_msg)self.error_logs.append({'url': url,'error': error_msg,'timestamp': datetime.now().isoformat()            })returnNonedef_process_page(self, page_data: Dict) -> None:"""处理网页内容"""ifnot page_data:returntry:# 提取标题作为示例            soup = BeautifulSoup(page_data['html'], 'html.parser')            title = soup.title.string if soup.title else'No title found'# 安全处理:对内容进行哈希,避免存储敏感信息            content_hash = hashlib.sha256(page_data['html'].encode('utf-8')).hexdigest()self.results.append({'url': page_data['url'],'title': title,'content_hash': content_hash,'status_code': page_data['status_code'],'timestamp': page_data['timestamp']            })            logger.info(f"Successfully processed {page_data['url']}")except Exception as e:            error_msg = f"Error processing {page_data['url']}{str(e)}"            logger.error(error_msg)self.error_logs.append({'url': page_data['url'],'error': error_msg,'timestamp': datetime.now().isoformat()            })def_bfs_crawl(self, start_url: str) -> None:"""广度优先搜索爬取"""from collections import deque        queue = deque([(start_url, 0)])  # (url, depth)while queue:            current_url, current_depth = queue.popleft()# 检查是否已访问过            normalized_url = self._normalize_url(current_url)if normalized_url inself.visited_urls:continue# 检查深度限制if current_depth > self.max_depth:continue# 标记为已访问self.visited_urls.add(normalized_url)# 获取页面            page_data = self._fetch_page(current_url)if page_data:# 处理页面self._process_page(page_data)# 提取链接并加入队列if current_depth < self.max_depth:                    links = self._extract_links(page_data['html'], current_url)for link in links:if link notinself.visited_urls:                            queue.append((link, current_depth + 1))defrun(self) -> None:"""运行爬虫"""try:# 检查robots.txtifnotself.robots_txt_checked:ifnotself._check_robots_txt():                    logger.error("Crawling prohibited by robots.txt")returnself.robots_txt_checked = True# 开始爬取            logger.info(f"Starting crawl from {self.base_url}")self._bfs_crawl(self.base_url)            logger.info("Crawl completed successfully")except Exception as e:            logger.critical(f"Fatal error in crawler: {str(e)}")raisefinally:# 保存结果self._save_results()def_save_results(self) -> None:"""保存爬取结果"""try:# 保存成功结果ifself.results:withopen('crawl_results.json''w', encoding='utf-8'as f:                    json.dump(self.results, f, indent=2, ensure_ascii=False)# 也保存为CSV格式withopen('crawl_results.csv''w', newline='', encoding='utf-8'as f:                    writer = csv.DictWriter(f, fieldnames=['url''title''content_hash''status_code''timestamp'])                    writer.writeheader()                    writer.writerows(self.results)# 保存错误日志ifself.error_logs:withopen('crawl_errors.json''w', encoding='utf-8'as f:                    json.dump(self.error_logs, f, indent=2, ensure_ascii=False)            logger.info("Results saved successfully")except Exception as e:            logger.error(f"Failed to save results: {str(e)}")# 示例使用if __name__ == "__main__":# 配置目标网站 (请替换为合法可爬取的网站)    TARGET_URL = "https://example.com"# 创建爬虫实例    crawler = WebCrawler(        base_url=TARGET_URL,        max_depth=2,        delay_range=(13)    )try:# 运行爬虫        crawler.run()except KeyboardInterrupt:        logger.info("Crawler stopped by user")except Exception as e:        logger.error(f"Crawler failed: {str(e)}")

3.2 代码安全特性解析

  1. 1. 合规性检查
    • • 自动检查robots.txt协议
    • • 限制爬取域名范围
    • • 标准化URL防止重复爬取
  2. 2. 反爬虫应对
    • • 随机User-Agent轮换
    • • 请求间隔随机化
    • • 只处理HTML内容
  3. 3. 数据安全
    • • 对爬取内容进行哈希处理
    • • 完整访问日志记录
    • • 结果加密存储(实际应用中应添加加密)
  4. 4. 错误处理
    • • 全面的异常捕获
    • • 错误日志分离存储
    • • 资源清理保证

四、高级功能扩展

4.1 代理IP池集成

classProxyManager:def__init__(self, proxy_list: List[str]):self.proxies = [{'http': p, 'https': p} for p in proxy_list]self.current_proxy_index = 0defget_proxy(self) -> Dict:"""获取当前代理"""ifnotself.proxies:return {}        proxy = self.proxies[self.current_proxy_index]self.current_proxy_index = (self.current_proxy_index + 1) % len(self.proxies)return proxydefrotate_proxy(self) -> None:"""手动轮换代理"""self.current_proxy_index = (self.current_proxy_index + 1) % len(self.proxies)# 在WebCrawler类中修改_fetch_page方法def_fetch_page(self, url: str) -> Optional[Dict]:try:        time.sleep(self._get_random_delay())# 获取代理        proxy = self.proxy_manager.get_proxy() ifhasattr(self'proxy_manager'else {}        response = self.session.get(            url,            timeout=15,            headers={'User-Agent'self.ua.random},            proxies=proxy        )# 其余代码不变...

4.2 异步爬取优化

import aiohttpimport asynciofrom typing import Awaitable, ListclassAsyncWebCrawler(WebCrawler):def__init__(self, *args, **kwargs):super().__init__(*args, **kwargs)self.semaphore = asyncio.Semaphore(10)  # 并发控制asyncdef_afetch_page(self, url: str) -> Optional[Dict]:"""异步获取页面"""asyncwithself.semaphore:try:await asyncio.sleep(self._get_random_delay())asyncwith aiohttp.ClientSession() as session:asyncwith session.get(                        url,                        headers={'User-Agent'self.ua.random},                        timeout=aiohttp.ClientTimeout(total=15)                    ) as response:if response.status == 200:                            content_type = response.headers.get('content-type''')if'text/html'in content_type:                                html = await response.text()return {'url': url,'status_code': response.status,'html': html,'timestamp': datetime.now().isoformat()                                }except Exception as e:                error_msg = f"Error fetching {url}{str(e)}"                logger.error(error_msg)self.error_logs.append({'url': url,'error': error_msg,'timestamp': datetime.now().isoformat()                })returnNoneasyncdef_aprocess_url(self, url: str, depth: int) -> None:"""异步处理单个URL"""        normalized_url = self._normalize_url(url)if normalized_url inself.visited_urls:returnif depth > self.max_depth:returnself.visited_urls.add(normalized_url)        page_data = awaitself._afetch_page(url)if page_data:self._process_page(page_data)if depth < self.max_depth:                links = self._extract_links(page_data['html'], url)                tasks = [self._aprocess_url(link, depth + 1for link in links]await asyncio.gather(*tasks)asyncdef_abfs_crawl(self, start_url: str) -> None:"""异步广度优先搜索"""        queue = asyncio.Queue()await queue.put((start_url, 0))whilenot queue.empty():            current_url, current_depth = await queue.get()awaitself._aprocess_url(current_url, current_depth)defrun_async(self) -> None:"""运行异步爬虫"""try:ifnotself.robots_txt_checked:ifnotself._check_robots_txt():                    logger.error("Crawling prohibited by robots.txt")returnself.robots_txt_checked = True            logger.info(f"Starting async crawl from {self.base_url}")            asyncio.run(self._abfs_crawl(self.base_url))            logger.info("Async crawl completed successfully")except Exception as e:            logger.critical(f"Fatal error in async crawler: {str(e)}")raisefinally:self._save_results()

五、网络安全最佳实践

5.1 爬取策略建议

  1. 1. 速率限制
    • • 实施指数退避算法处理失败请求
    • • 根据网站响应调整爬取速度
  2. 2. 目标选择
    • • 优先爬取公开数据集
    • • 避免爬取个人隐私信息
    • • 尊重版权和知识产权
  3. 3. 行为模拟
    • • 模拟人类浏览行为
    • • 随机浏览模式
    • • 适当停留时间

5.2 数据处理建议

  1. 1. 数据最小化
    • • 只存储必要字段
    • • 及时删除临时数据
  2. 2. 数据保护
    • • 爬取数据加密存储
    • • 访问控制严格实施
    • • 定期安全审计
  3. 3. 合规报告
    • • 记录爬取活动
    • • 准备合规性报告
    • • 配合监管审查

本文设计并实现了一个安全、合规的批量网页爬取框架,重点考虑了网络安全领域的特殊需求:

  1. 1. 合规性:自动检查robots.txt,限制爬取范围
  2. 2. 健壮性:全面的异常处理和日志记录
  3. 3. 安全性:数据哈希处理,代理轮换,请求间隔控制
  4. 4. 可扩展性:支持同步和异步实现,易于添加新功能

未来发展方向包括:

  • • 集成机器学习进行智能爬取策略调整
  • • 添加对JavaScript渲染页面的支持
  • • 实现更复杂的反反爬虫机制
  • • 开发分布式爬取架构提高效率

网络安全专业人员应始终牢记:技术能力必须与法律意识和伦理准则相结合,确保所有爬取活动都在合法合规的框架内进行。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-04-20 15:19:10 HTTP/2.0 GET : https://f.mffb.com.cn/a/484738.html
  2. 运行时间 : 0.084626s [ 吞吐率:11.82req/s ] 内存消耗:4,741.34kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=931ab663b61d876087e105d174648da3
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000550s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000649s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000249s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000276s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000496s ]
  6. SELECT * FROM `set` [ RunTime:0.000204s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000521s ]
  8. SELECT * FROM `article` WHERE `id` = 484738 LIMIT 1 [ RunTime:0.002876s ]
  9. UPDATE `article` SET `lasttime` = 1776669550 WHERE `id` = 484738 [ RunTime:0.002022s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000258s ]
  11. SELECT * FROM `article` WHERE `id` < 484738 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000571s ]
  12. SELECT * FROM `article` WHERE `id` > 484738 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000466s ]
  13. SELECT * FROM `article` WHERE `id` < 484738 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.003731s ]
  14. SELECT * FROM `article` WHERE `id` < 484738 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.004713s ]
  15. SELECT * FROM `article` WHERE `id` < 484738 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.001263s ]
0.086314s