Ejemplo n.º 1
0
async def await_coroutine():
    containerID = await getContainerID()
    if __name__ == '__main__':
        objDic = {}
        i = 0
        for page in range(1, 1000):  # 抓取的数据
            time.sleep(1)
            json1 = get_single_page(page, containerID)
            results = parse_page(json1)
            for result in results:
                i += 1
                objDic[i] = result
                # print(result)
    tool.saveDicToJson(objDic, '%sweibo.txt' % (timeString))
Ejemplo n.º 2
0
def compareFiles(files, curDir):

    files = getFileDicByExt(files)
    for (k, v) in files.items():
        if k + suffix[0] in files.keys():
            v[suffix[0]] = k + suffix[0]
        if k + suffix[1] in files.keys():
            v[suffix[1]] = k + suffix[1]

    for (k, v) in files.items():
        if len(v) == 0:
            continue
        k_table = checkFile(k + post)
        for (m, n) in v.items():
            # print(type(n),n)
            compare_table = checkFile(n + post)
            if k_table == compare_table:
                # print(u"对比结果相同")
                pass
            else:
                tool.saveDicToJson(k_table, k)
                tool.saveDicToJson(compare_table, n)
                print(k + post, n + post)
    return
Ejemplo n.º 3
0
# coding=utf-8
Ejemplo n.º 4
0
# coding=utf-8
import os, os.path
from biplist import *
import time
import tool
import xlsdic
import sys
import re
reload(sys)
import urllib2
sys.setdefaultencoding("utf-8")
import json
import urllib2
import urllib2
import tool
import updateproject
os.chdir("..")
#表示上级目录
import urllib
f = urllib.urlopen("http://192.168.1.254:1997/pythonclient?opid=getcfg")
totalConf = json.loads(f.read())
lang_conf_name = "lang_conf"
proj_conf_name = "proj_conf"
net_conf_name = "net_conf"
logandpay_conf_name = "logandpay_conf"
channel_conf_name = "channel_conf"
goods_conf_name = "goods_conf"
lang_conf = totalConf[lang_conf_name]
proj_conf = totalConf[proj_conf_name]
tmp_conf = totalConf[net_conf_name]
Ejemplo n.º 5
0
def getTextLuaUsed():
    usedTextDic = {}

    fileList = []
    fileList = tool.getFileList(rootDir,None,fileList,[])
    fileList = tool.getFileType(fileList,check_post)
    fileList = tool.getFileExceptBlackList(fileList,[])
    fileList = tool.checkFileNameInList(fileList)

    for file in fileList:
        checkLuaFileLine(file,usedTextDic)

    return usedTextDic

def compareDic(usedTextDic,LuaUsedTextDic):
    retDic = {}
    for key,item in usedTextDic.items():
        if key not in LuaUsedTextDic.keys():
            retDic[key] = item
    return retDic

usedTextDic = getTextDicList()
LuaUsedTextDic = getTextLuaUsed()
retDic = compareDic(usedTextDic,LuaUsedTextDic)

tool.backToPath(project_name)
tool.saveDicToJson(retDic,"unBindingText.txt")
print(len(retDic))