1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

a script for yuemyutu's unique content method...

Discussion in 'Black Hat SEO Tools' started by nikhil88, Oct 27, 2008.

  1. nikhil88

    nikhil88 Regular Member

    Joined:
    Jun 12, 2008
    Messages:
    208
    Likes Received:
    97
    Occupation:
    E&TC Engineering Student
    Location:
    Pune,India
    good day bhw members

    this is a follow up to yuemyutu's method posted here

    i've created a script in python to automate this and save us from the copying and pasting

    first off u need to download python from
    HTML:
    http://www.python.org/download
    next u need to add it to your dos path
    info can be found here
    HTML:
    http://www.python.org/doc/faq/windows/
    i have attached the script (translator.txt)
    save it and change its extension to .py

    now start up command prompt , access the destination folder, and type in
    python translator.py

    it'll ask you what needs to be translated
    paste your content and press enter
    a new file called translated.txt will be created in the same folder where you have stored translator.py with the google translation

    obviously u need to touch up this content a little for possible errors.

    hope this helps someone.

    nikhil88
     

    Attached Files:

    • Thanks Thanks x 7
  2. Trota

    Trota Regular Member

    Joined:
    Feb 21, 2008
    Messages:
    356
    Likes Received:
    121
    this would be awsome if converted into a wordpress plugin...
     
  3. nikhil88

    nikhil88 Regular Member

    Joined:
    Jun 12, 2008
    Messages:
    208
    Likes Received:
    97
    Occupation:
    E&TC Engineering Student
    Location:
    Pune,India
    i'm sorry i forgot to mention a few things up there

    if u read the script, u'll notice this line:
    data = "http://translate.google.com/translate_a/t?client=t&%s&sl=de&tl=en" % urllib.urlencode({'text':trans})

    u can customize the translation by changing the 'sl=' and 'tl=' parameters
    sl would be the source language and tl is the translate to language

    the script i have provided follows this pattern
    english ->spanish->englsih->french->german->english

    u can change or add more combinations as per need

    nikhil88
     
  4. raghul

    raghul Registered Member

    Joined:
    Oct 6, 2008
    Messages:
    57
    Likes Received:
    20
    whats this method about??
    is it like rewriting and article??
     
  5. Chris Devon

    Chris Devon Jr. VIP Jr. VIP Premium Member

    Joined:
    Jul 2, 2008
    Messages:
    507
    Likes Received:
    192
    So this basically uses the google translator, so it's the same result if you translate it from the google's site?
     
  6. nikhil88

    nikhil88 Regular Member

    Joined:
    Jun 12, 2008
    Messages:
    208
    Likes Received:
    97
    Occupation:
    E&TC Engineering Student
    Location:
    Pune,India
    yep it uses google translator...so u wont have to keep copying and pasting ur content for multiple language translations....
     
  7. abantu

    abantu Newbie

    Joined:
    Oct 4, 2008
    Messages:
    11
    Likes Received:
    22
    I was trying tweak the script a little bit and have it read from a text file.... but somehow it's failing

    myfile = open("test.txt", "r")
    text = myfile.read()
    myfile.close()
    print text

    Any ideas how i can make that work?
     
  8. freller

    freller Regular Member

    Joined:
    Sep 26, 2008
    Messages:
    210
    Likes Received:
    65
    Great job nikhil88.

    This really does actually work! The grammar structure is retained very well and the cleaning up necessary is usually small.
     
  9. freller

    freller Regular Member

    Joined:
    Sep 26, 2008
    Messages:
    210
    Likes Received:
    65
    abantu - I tried to make a simple old batch file to run it but no dice - it wouldn't accept the text paste into the DOS window. The instructions given by nikhil88 work so I'm happy to leave it at that at present.
     
  10. JinxY

    JinxY Regular Member

    Joined:
    May 14, 2007
    Messages:
    376
    Likes Received:
    66
    nice script, its working great :) thanks for sharing!
     
  11. jadsn

    jadsn Regular Member

    Joined:
    Jul 29, 2008
    Messages:
    354
    Likes Received:
    114
    thx so much! i will test in a few
     
  12. jadsn

    jadsn Regular Member

    Joined:
    Jul 29, 2008
    Messages:
    354
    Likes Received:
    114
    how can you paste something in the command prompt? everytime i try it shows ^v
     
  13. tata7171

    tata7171 Registered Member

    Joined:
    Apr 27, 2008
    Messages:
    65
    Likes Received:
    171
    Location:
    some place hot
    try right clicking ur mouse on the dos windows, and select paste

    :p
     
    • Thanks Thanks x 1
  14. mtime88

    mtime88 Regular Member

    Joined:
    Mar 10, 2008
    Messages:
    329
    Likes Received:
    79
    Occupation:
    Student
    Location:
    Near Philadelphia
    nice! a great addon would be like to rewrite a folder of articles at once.
     
  15. jadsn

    jadsn Regular Member

    Joined:
    Jul 29, 2008
    Messages:
    354
    Likes Received:
    114
    this works real great!!! thanks so much... sell it over at DP lol
     
  16. nikhil88

    nikhil88 Regular Member

    Joined:
    Jun 12, 2008
    Messages:
    208
    Likes Received:
    97
    Occupation:
    E&TC Engineering Student
    Location:
    Pune,India
    thanks guys

    @jadsn
    u cant use the ctrl+v command in prompt
    just right click and click paste

    and i think the word limit for google translator is 300 at a time...not so sure about this though
     
  17. nikhil88

    nikhil88 Regular Member

    Joined:
    Jun 12, 2008
    Messages:
    208
    Likes Received:
    97
    Occupation:
    E&TC Engineering Student
    Location:
    Pune,India
    @abantu
    try this

    f = open('test.txt')
    for s in f:
    s = s.strip("n")
    print s
    f.close
     
  18. yuemyutu

    yuemyutu Registered Member

    Joined:
    Apr 5, 2008
    Messages:
    67
    Likes Received:
    728
    Location:
    CA
    Thank you nikhil88. Nice script. keep up the good work!
     
  19. abantu

    abantu Newbie

    Joined:
    Oct 4, 2008
    Messages:
    11
    Likes Received:
    22
    Thank you nikhil88, that worked. Google temporarily blocked my ip for to many automated requests.
     
  20. nikhil88

    nikhil88 Regular Member

    Joined:
    Jun 12, 2008
    Messages:
    208
    Likes Received:
    97
    Occupation:
    E&TC Engineering Student
    Location:
    Pune,India
    glad to be of help.... and i got my first 'thank you's too :)