当前位置:网站首页>使用dedecms自带采集功能的文字过滤与替换
使用dedecms自带采集功能的文字过滤与替换
2022-08-08 19:00:00 【米米素材网】
使用dedecms建站一般都会用到采集功能 这篇文章将为您讲述: 如何使用dedecms自带采集功能的文字过滤与替换的方法
1.去除超链接,这种最常用。
{dede:trim replace=”}<a([^>]*)>{/dede:trim} {dede:trim replace=”}</a>{/dede:trim} 如果填成这样,那就把链接的文本也一起去掉了
{dede:trim replace=”}<a([^>]*)>(.*)</a>{/dede:trim}
2.过滤JS调用广告,比如GG的广告,就加个这样的:
{dede:trim replace=”}<script([^>]*)>(.*)</script>{/dede:trim}
3.过滤div标签。
这个很重要,如果没过滤干净则可能使发布出来的文章版面错位, 目前大多数遇到采集后错位的原因在此。
{dede:trim replace=”}<div([^.]*)>{/dede:trim} {dede:trim replace=”}</div>{/dede:trim}
有的时候也需要这样子过滤:
{dede:trim replace=”}<div 选择器>(.*)</div>{/dede:trim}
4.其它的过滤规则可以照以上规律进行推出。 5.过滤摘要和关键字使用,经常要用到。
{dede:trim replace=”}{/dede:trim}
6.简单替换。 {dede:trim replace=’替换后的词语’}要替换的词语{/dede:trim}例子:{dede:trim replace="米米素材网"}服务器之家{/dede:trim} 采集的内容当然也要求搜索引擎收录, 过滤和替换目的是减少重复,进行伪原创,如何具体的操作,就看个人的要求与喜好了。
边栏推荐
- 聚名十周年线上庆典正式开启,发送祝福即有好礼相赠~
- The origin and creation of Smobiler's complex controls
- el-tree设置单选,点击完成后收起
- view, index
- 用工具实现 Mock API 的整个流程
- Lecture 4: Database Definition Language of DDL Type of SQL Statements
- Geometric g6 will carry harmonyos system, a comprehensive upgrade competitiveness of products
- nyoj 712 Exploring treasure
- MogDB学习笔记-从0开始
- PX4-做飞控二次开发需要知道的事情-Cxm
猜你喜欢
第4讲:SQL语句之DDL类型的数据库定义语言
[极客大挑战 2019]BuyFlag&&[HCTF 2018]admin
ORACLE子查询 导致无法谓词推入的研究
The origin and creation of Smobiler's complex controls
Dandelion R300A 4G router, remote monitoring PLC tutorial
leetcode 240.搜索二维矩阵II 分治思想
SSM项目整合——综合案例
BP神经网络
Research on ORACLE subqueries that lead to inability to push predicates
Generate captchas tools
随机推荐
leetcode 240.搜索二维矩阵II 分治思想
数字化工厂建设的内容主要有哪三个方面
nyoj 712 探 寻 宝 藏(双线dp 第六届河南省程序设计大赛)
nyoj685 查找字符串(map)
Geometric g6 will carry harmonyos system, a comprehensive upgrade competitiveness of products
view, index
hdu1042 N!(大数)
The history of cartoon rendering
Ability in general, but it can be large horizontal jump freely?Where is the better?
【761. 特殊的二进制序列】
对话框管理器第六章:消息循环中的细节
C language elementary - structure
Leetcode 23.合并K个升序链表 链表归并合并
轻量全景查看器 pannellum初探
Redis Server启动过程
室外光纤资源管理——可视化管理平台
C语言初阶-结构体
How to add F4 Value Help trial version to the input parameters of the report in the ABAP report
ABAP 报表中如何给报表的输入参数增添 F4 Value Help 试读版
The origin and creation of Smobiler's complex controls