落伍者站长论坛's Archiver

ah520 发表于 2008-5-4 20:22

网站内容:把采集来的内容变为原创

参考了玄猫的正则表达式,结合自己的经历写这个东西。前些天百度的大规模封站估计很多人还心有余悸,单纯采集的站已经极度危险的地步了,考虑变通下。很多人觉得修改标题是一个办法,当然还可以结合修改内容来搞,让搜索引擎认为是原创的,这样会获得良好的排名。参考玄猫提供的关键词词频修正表达式,试了下,非常有用,特转过来。[code]'正则表达式函数
Function doReExec(strng,patrn)
  Dim regEx, Match, Matches,RetStr      ' 创建变量。
  Set regEx = New RegExp         ' 创建正则表达式。
  regEx.Pattern = patrn          ' 设置模式。
  regEx.IgnoreCase = True         ' 设置为不区分大小写。
  regEx.Global = True         ' 设置全局适用。
  Set Matches = regEx.Execute(strng)   ' 执行搜索。
  For Each Match in Matches      ' 对 Matches 集合进行迭代。
    RetStr = RetStr & Match.Value & "," & vbCRLF
  Next
  doReExec = RetStr
End Function

'词频修正函数
Function Original(str)
         
        Dim temparr,ltemp,ltemp2
        str = Replace(str,vbCrLf,"")
         
        temparr = ""
        If Trim(temparr) = "" Then temparr = doReExec(str,"<p[^>]*>([^<]+)</p>")
        If Trim(temparr) = "" Then temparr = doReExec(str,"<br>([^<]+)<br>")
        If Trim(temparr) = "" Then temparr = doReExec(str,"<div [^>]*>([^<]+)</div>")
        If Trim(temparr) = "" Then temparr = doReExec(str,"<span [^>]*>([^<]+)</span>")
        If Trim(temparr) = "" Then Original = str : Exit Function

        temparr = Split(temparr,",")
        randomize
        ltemp = Int(Rnd()*UBound(temparr))+1
        ltemp2 = Timer Mod UBound(temparr)
        Original = "<div id=""correct""><b>gannyle.cn本文摘要</b>:<br />" & temparr(ltemp) &  temparr(ltemp2) &  "</div>" & str
End Function[/code][color=Red]是在对不起大家,我也不会,我是从某个博客上看到的,所以拿到落伍供落伍高人研究用!请高手大侠不吝赐教[/color]

[[i] 本帖最后由 ah520 于 2008-5-5 03:37 编辑 [/i]]

ah520 发表于 2008-5-4 21:17

这么大的沙发等了半天没人做 自己做

网络泡沫 发表于 2008-5-4 21:20

是很有用的东西 但不会用啊 :(

终极黑客 发表于 2008-5-4 21:25

不会用,详细点好吧

mlken 发表于 2008-5-4 21:29

这个。。
这个也可以?

29668 发表于 2008-5-4 21:30

:ohh: 很好!正用得着!

卖了灵魂赎罪 发表于 2008-5-4 22:03

说说怎么用可以不

mobil 发表于 2008-5-4 22:35

:ohh:

oklrc 发表于 2008-5-5 00:39

虽然看不明白,但要支持一下!

就爱我家 发表于 2008-5-5 00:45

[quote]原帖由 [i]终极黑客[/i] 于 2008-5-4 21:25 发表 [url=http://www.im286.com/redirect.php?goto=findpost&pid=25901340&ptid=2558916][img]http://www.im286.com/images/common/back.gif[/img][/url]
不会用,详细点好吧 [/quote]

阿红 发表于 2008-5-5 01:58

*** 作者被禁止或删除 内容自动屏蔽 ***

5year 发表于 2008-5-5 02:33

看不懂:(

taoqoo 发表于 2008-5-5 09:20

研究

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.