-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
27 lines (23 loc) · 782 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
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import config
reload(sys)
sys.setdefaultencoding('utf-8')
import logging
from controller2 import Controller
from unslib import *
if __name__ == '__main__':
logging.basicConfig(filename='log/weibo.log', filemode='w',
format='[%(asctime)s] - %(module)s.%(funcName)s.%(lineno)d - %(levelname)s - %(message)s',
level=logging.DEBUG)
filepath = config.UID_FILEPATH
uns = get_uns_uids(filepath)[0]
Controller.let_us_go(uns)
def runControl():
uid_len_beforerun=len_uns(filepath)
Controller.let_us_go(uns)
uid_len_afterrun=len_uns(filepath)
if uid_len_afterrun>uid_len_beforrun:
runControl()
#runControl()