-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
main.py
33 lines (26 loc) · 819 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import logging
import sys
from expressvpn import wrapper
from core import run
def get_new_ip():
while True:
try:
print('GETTING NEW IP')
wrapper.random_connect()
print('SUCCESS')
return
except:
pass
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s', stream=sys.stdout)
# https://news.google.co.jp
# https://news.google.com/?output=rss&hl=fr
# RSS Feed does not work for Japanese language.
# get_articles('プロクター・アンド・ギャンブル')
while True:
try:
run()
except:
print('EXCEPTION CAUGHT in __MAIN__')
print('Lets change our PUBLIC IP GUYS!')
get_new_ip()