本文整理汇总了Python中protocol.Protocol.getFullResult方法的典型用法代码示例。如果您正苦于以下问题:Python Protocol.getFullResult方法的具体用法?Python Protocol.getFullResult怎么用?Python Protocol.getFullResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类protocol.Protocol
的用法示例。
在下文中一共展示了Protocol.getFullResult方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from protocol import Protocol [as 别名]
# 或者: from protocol.Protocol import getFullResult [as 别名]
#.........这里部分代码省略.........
except ObjectDoesNotExist:
OKVEDObj = OkvedCodes(code=OKVED, description=OKVEDstr[len(OKVED)].strip(), parent=None)
OKVEDObj.save()
try:
OKDPObj = OKDPCodes.objects.get(code=OKDP)
except ObjectDoesNotExist:
print("\tOKDP Code %s not found.Saved" % OKDP)
OKDPObj = OKDPCodes(code=OKDP, description=OKDPstr[len(OKDP):].strip())
OKDPObj.save()
try:
print("LOT %s" % name)
lotObj = Lot.objects.get(name=name, purchase_fk=purchaseObj)
print("\tFound")
except ObjectDoesNotExist:
print("\tNot Found")
lotObj = Lot(name=name
, joint=joint \
, startPrice=priceValue \
, OKVED_fk=OKVEDObj \
, OKDP_fk=OKDPObj
, purchase_fk=purchaseObj)
lotObj.save()
##############################
## CHECK IF PROTOCOL EXISTS ##
##############################
protocolparam = purchasePageParser.getLastProtocolUrl()
print("Protocol")
if protocolparam is not None:
print("\tFound")
protocolPageParser = ProtocolPageParser(protocolparam)
for applicant in protocolPageParser.getFullResult():
applicantParams = applicant.get(u"Участник")
if applicantParams is None:
## NO APPLICANTS ##
print("\tNo applicants -> Next")
break
priceParams = applicant.get(u"Предложенная цена договора")
publicTime = applicant.get(u"Дата и время получения заявки")
admission = applicant.get(u"Допуск")
place = applicant.get(U"Результат")
isLegalEntity = applicant.get(u"Юридическое лицо")
isIndividual = applicant.get(u"Физическое лицо")
notRussianResident = applicant.get(u"Не резидент")
try:
innIndex = applicantParams.index(u"ИНН")
INN = ''.join(x for x in applicantParams[innIndex:] if x.isdigit())
innValueEnd = applicantParams.index(INN) + len(INN)
applicantParams = applicantParams[0: innIndex] + applicantParams[innValueEnd:]
except ValueError:
INN = u""
try:
KPPIndex = applicantParams.index(u"КПП")
KPP = ''.join(x for x in applicantParams[KPPIndex:] if x.isdigit())
KPPValueEnd = applicantParams.index(KPP) + len(KPP)
applicantParams = applicantParams[0: KPPIndex] + applicantParams[KPPValueEnd:]
except ValueError:
KPP = u""
name = applicantParams.strip()
###########################
## GET APPLICANT COMPANY ##
###########################