Wrote this and thought it might help someone, gets a new IP every 30mins, you need python & selenium & chrome webdriver, run alongside JV.
# change IP every so many seconds. 1800 seconds is 30 mins.
# it uses selenium to click the data off then back on, then shows the new ip address through the proxy server
from selenium import webdriver
import time
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
s = requests.Session()
retry = Retry(connect=3, backoff_factor=0.5)
adapter = HTTPAdapter(max_retries=retry)
s.mount('http://', adapter)
s.mount('https://', adapter)
while True:
try:
browser = webdriver.Chrome('/instagramapi/chromedriver.exe')
browser.get('http://192.168.8.1/html/mobileconnection.html')
button = browser.find_element_by_id('mobilenetwork_turnOff_button')
button.click()
time.sleep(5)
button = browser.find_element_by_id('mobilenetwork_turnOn_button')
button.click()
time.sleep(5)
browser.quit()
time.sleep(20)
r = s.get("http://www.alloys.xyz/ip.asp", proxies={'http': 'http://192.168.8.100:808'})
print(r.text)
time.sleep(1800)
except Exception as e:
print("Restarted as error in script " + str(e))
This wont work with networks which are true LTE. ( Like Jio - India ), Normally IP doesnât changes when we manually turn on & off mobile data.
IP changes when we turn on âflight-modeâ.
so only âdevice rebootâ works in our case.
Thatâs interesting. Is it working if you do it via a VM like virtual box for example? The script is still able to target the right USB where you have the dongle attached for having internet via dongle only in VM instance?
So the python script just sits and runs forever on the server. The http://192.168.8.1/html/mobileconnection.html is this, the selenium script is just opening up a browser and pressing that button; As I add more accounts to the 4g connection, im going to decrease the time in my script, thatâs my plan.
I have 10 account so far, and they are all following/unfollowing/liking/messaging on JV and LE yesterday, 25/07/19 I used 814.72 MB!
I did try having the auto disconnect set low but the IP didnât seem to change very often.