ngrok: start gist and get proxy ip in a single function
parent
bd7a74d08c
commit
30a4e89c27
Binary file not shown.
|
@ -6,13 +6,26 @@
|
|||
from utils import browser_manager
|
||||
from selenium.webdriver.common.by import By
|
||||
import time
|
||||
from colab import colab
|
||||
|
||||
def start_proxy_get_ip():
|
||||
c = colab.ColabGist('https://colab.research.google.com/gist/EmaMaker/4e1478c9913a2df58fc1b8ff422fa161/proxy.ipynb', ('giangillo.rossi@gmail.com', 'emamaker02'), minutes=3)
|
||||
c.run()
|
||||
|
||||
time.sleep(120)
|
||||
|
||||
n = Ngrok()
|
||||
n.start_browser()
|
||||
n.access_ngrok()
|
||||
|
||||
return n.get_proxy_ip()
|
||||
|
||||
class Ngrok:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def start_browser(self):
|
||||
self.driver = browser_manager.start_browser()
|
||||
self.driver = browser_manager.start_browser(headless=True)
|
||||
|
||||
def close_browser(self):
|
||||
browser_manager.quit_browser(self.driver)
|
||||
|
|
Loading…
Reference in New Issue