Ejemplo n.º 1
0
def checkRequest(req):
    ops_client = epo_ops.Client(key, secret)
    #        data = ops_client.family('publication', , 'biblio')
    ops_client.accept_type = 'application/json'
    try:
        lstBrevets2, nbTrouves = PatentSearch(ops_client, req)
        return nbTrouves
    except:
        return 0
Ejemplo n.º 2
0
     GatherBibli = False
     requete = DataBrevets['brevets']
 if 'FusionPat' in DataBrevets:
     ficOk = True
     print(nbActus,
           " patents gathered yet. Steping to bibliographic data.")
     GatherPatent = False
     Gatherbibli = True
     requete = DataBrevets['brevets']
 if GatherPatent:
     if DataBrevets['requete'] != requete:
         print(
             "care of using on file for one request, deleting this one."
         )
         input('sure? Unlee use ^C ( CTRL+C)')
     lstBrevets2, nbTrouves = PatentSearch(ops_client, requete)
     if len(lstBrevets) == nbTrouves and nbActus != nbTrouves:
         ficOk = True
         print(
             nbTrouves,
             " patents gathered yet. No more patents to retreive. Steping to bibliographic data."
         )
         Gatherbibli = True
         GatherPatent = False
     elif len(lstBrevets) == nbTrouves and nbActus == nbTrouves:
         Gatherbibli = False
         GatherPatent = False
         DataB = dict()
         with open(ResultBiblioPath + '//Description' + ndf,
                   'wb') as ficRes:
             DataB['ficBrevets'] = ndf