J'essaie de récupérer les brevets de plusieurs organisations à partir de PatentsView. Des exemples sont disponibles à l'adresse suivante http://www.patentsview.org/api/query-language.html
Voici ma question :
import csv
import requests
import json
# Use this format for GET requests
url = 'http://www.patentsview.org/api/patents/query?q={"_and":[{"inventor_last_name":"Jobs"},{"assignee_lastknown_country":"US"}]}&f=["patent_number"]'
# This format is for POST
url1 = 'http://www.patentsview.org/api/patents/query'
# String contains the value string (http://www.patentsview.org/api/query-language.html)
body = '{"q":{"_contains":{"assignee_organization":["Samsung","Apple"]}},"f":["assignee_organization"]}'
url2 = 'http://www.patentsview.org/api/patents/query?q={"_contains": {"assignee_organization":["Samsung","Apple"]}}&f=["assignee_organization","patent_number","patent_title"]'
r = requests.get(url2)
# r = requests.post(url1,body)
print r.text
La sortie de la requête est :
{"patents":[{"patent_number":"4221975","patent_title":"Touch activated controller and method","assignees":[{"assignee_organization":"Touch Activated Switch Arrays, Inc."}]},{"patent_number":"4288786","patent_title":"Touch sensing keyboard construction","assignees":[{"assignee_organization":"Touch Activated Switch Arrays, Inc."}]},{"patent_number":"4321479","patent_title":"Touch activated controller and method","assignees":[{"assignee_organization":"Touch Activated Switch Arrays, Inc."}]},{"patent_number":"4455452","patent_title":"Touch activated controller for generating X-Y output information","assignees":[{"assignee_organization":"Touch Activated Switch Arrays, Inc."}]},{"patent_number":"4689657","patent_title":"IC interconnect system using metal as a mask","assignees":[{"assignee_organization":"Lasarray Holding AG"}]},{"patent_number":"4691434","patent_title":"Method of making electrically conductive regions in monolithic semiconductor devices as applied to a semiconductor device","assignees":[{"assignee_organization":"Lasarray Holding AG"}]},{"patent_number":"4695698","patent_title":"Method of, and apparatus for, generating a predetermined pattern using laser radiation","assignees":[{"assignee_organization":"Lasarray Holding AG"}]},{"patent_number":"4695986","patent_title":"Ultrasonic transducer component and process for making the same and assembly","assignees":[{"assignee_organization":"Ultrasonic Arrays, Inc."}]},{"patent_number":"4733222","patent_title":"Capacitance-variation-sensitive touch sensing array system","assignees":[{"assignee_organization":"Integrated Touch Arrays, Inc."}]},{"patent_number":"4769793","patent_title":"Dual reference surface transducer","assignees":[{"assignee_organization":"Ultrasonic Arrays, Inc."}]},{"patent_number":"4790438","patent_title":"Electrical component sequential testing apparatus","assignees":[{"assignee_organization":"Array Instruments, Inc."}]},{"patent_number":"4809014","patent_title":"Apparatus for and method of positioning and synchronizing a writing laser beam","assignees":[{"assignee_organization":"Lasarray Holding AG"}]},{"patent_number":"4823590","patent_title":"Automatic calibration method for thickness gauges","assignees":[{"assignee_organization":"Ultrasonic Arrays, Inc."}]},{"patent_number":"4871896","patent_title":"Process and device to enhance system performance accuracy in a laser writing process","assignees":[{"assignee_organization":"Lasarray Holding AG"}]},{"patent_number":"4882657","patent_title":"Pin grid array assembly","assignees":[{"assignee_organization":"ICI Array Technology, Inc."}]},{"patent_number":"4887246","patent_title":"Ultrasonic apparatus, system and method","assignees":[{"assignee_organization":"Ultrasonic Arrays, Inc."}]},{"patent_number":"4888086","patent_title":"Ultrasonic method","assignees":[{"assignee_organization":"Ultrasonic Arrays, Inc."}]},{"patent_number":"4955225","patent_title":"Automatic calibration method for thickness gauges","assignees":[{"assignee_organization":"Ultrasonic Arrays, Inc."}]},{"patent_number":"5001714","patent_title":"Unpredictable fault detection using adaptive inference testing techniques","assignees":[{"assignee_organization":"Array Analysis, Inc."}]},{"patent_number":"5020011","patent_title":"System for displaying adaptive inference testing device information","assignees":[{"assignee_organization":"Array Analysis, Inc."}]},{"patent_number":"5029079","patent_title":"Apparatus and method for flexible control of digital signal processing devices","assignees":[{"assignee_organization":"Array Microsystems, Inc."}]},{"patent_number":"5043987","patent_title":"Method for calculating adaptive inference test figure of merit","assignees":[{"assignee_organization":"Array Analysis, Inc."}]},{"patent_number":"5046034","patent_title":"Array structure for use in an adaptive inference testing device","assignees":[{"assignee_organization":"Array Analysis, Inc."}]},{"patent_number":"5050173","patent_title":"Looped, phased array laser oscillator","assignees":[{"assignee_organization":"Phased Array Lasers Pty Ltd."}]},{"patent_number":"5068814","patent_title":"Interactive adaptive inference system","assignees":[{"assignee_organization":"Array Analysis, Inc."}]}],"count":25,"total_patent_count":601}
Pour une raison quelconque, le serveur semble considérer "Array" comme un élément de l'architecture de l'entreprise. assignee organization
nom. L'exécution de la même requête avec un seul nom de société semble fonctionner correctement.
Quelle est la meilleure façon de résoudre le problème ?