#!/usr/bin/python
|
# -*- coding: utf-8 -*-
|
#
|
##@package
|
#
|
# @todo: 基于头条广告API对接点击 激活 注册 付费信息交互
|
#
|
# @author: Alee
|
# @date 2018-5-4 22:10:51
|
# @version 1.0
|
#
|
# @note:
|
#
|
#---------------------------------------------------------------------
|
import adapp
|
from bottle import run
|
from lib import mylog, CommFunc
|
import os
|
import datetime
|
import sys
|
|
|
DEF_DEBUG = False
|
# center.secondworld.net.cn
|
def main():
|
os.system("title AD-%s"%datetime.datetime.today())
|
mylog.InitLog(r"C:/ServerLog", "ad.txt", True, DEF_DEBUG)
|
|
adport = 53004
|
if len(sys.argv) == 2:
|
adport = CommFunc.ToIntDef(sys.argv[1], adport)
|
|
run(host='0.0.0.0', port=adport, app=adapp.myapp, server='waitress')
|
return
|
|
if __name__ == '__main__':
|
main()
|