dr_0x
Regular Member
- May 9, 2010
- 307
- 266
I noticed this thread.
I am now going to show everyone why I like python so much more than something like php.
Article Spinner in Python.
As you can see its like the php one from the thread above but in less than half the amount of code.
Maybe you want to mix up the sentences so as to be more uniqe.
Cheers!
Code:
http://www.blackhatworld.com/blackhat-seo/black-hat-seo/340392-your-own-article-spinner-php.html
I am now going to show everyone why I like python so much more than something like php.
Article Spinner in Python.
Code:
import re
def spinner(s):
r = re.compile('{([^{}]*)}')
while True:
s, n = r.subn(select, s)
if n == 0: break
return s.strip()
As you can see its like the php one from the thread above but in less than half the amount of code.
Maybe you want to mix up the sentences so as to be more uniqe.
Code:
def splitsents(s):
r = re.compile('(\?|\.|\!)')
spun_sents = r.split(s)
index = randint(0,len(spun_sents)-1)
for n in range(0,2):
i = spun_sents.pop(index)
spun_sents.append(i)
return ' '.join(spun_sents)
Cheers!