Youtube views increaser with Imacros/python

gutterseo

▬▬▬▬▬▬▬&
Feb 27, 2009
1,271
27
48
Was bored this afternoon and whipped this up. Its pretty self explanatory and will only work in IE. Run the python script and it will generate the macro.

Code:
#!/usr/bin/python

url = 'http://www.youtube.com/watch?v=zqx4E5tq1Bo'   # URL of youtube video, must auto play on page load
length = '150'    # Video length in seconds
proxies = ['ip:port', 'ip:port']    # List of proxies

f = open('macro.txt', 'a')
f.write('TAB T=1\n')

for proxy in proxies:
    f.write('PROXY ADDRESS=' + proxy + '\n')
    f.write('URL GOTO=' + url + '\n')
    f.write('WAIT SECONDS' + length + '\n')
    f.write('CLEAR' + '\n')

f.close()
 


Hope you don't mind man, but I modded it a bit so I can call it automatically. But this only works for windows.

I'm running it now as a scheduled task. :)

import win32com.client
import array
import sys

url = sys.argv[1] # URL of youtube video, must auto play on page load
length = sys.argv[2] # Video length in seconds
proxy_path = sys.argv[3]

proxies=[]
inp = open (proxy_path ,"r")

for line in inp.readlines():
proxies.append(line.strip("\n"))

filename = "G:\Xampp 3\Python\youtube_macro.iim"

f = open(filename, 'a')
f.write('TAB T=1\n')

for proxy in proxies:
f.write('PROXY ADDRESS=' + proxy + '\n')
f.write('URL GOTO=' + url + '\n')
f.write('WAIT SECONDS=' + length + '\n')
f.write('CLEAR' + '\n')

f.close()

w=win32com.client.Dispatch("imacros")
w.iimInit("", 1)
w.iimPlay(filename)

Can be used like:

Youtube.py "http://www.youtube.com/watch?v=zqx4E5tq1Bo" "150" "G:\Xampp 3\Python\proxylist.txt"