使用Google专利api

2024-04-18

我只是想使用 Python 和 Google 专利搜索 API 找出专利的所有者。

import urllib2
import json

url = ('https://ajax.googleapis.com/ajax/services/search/patent?' +
       'v=1.0&q=barack%20obama')

request = urllib2.Request(url, None, {})
response = urllib2.urlopen(request)

# Process the JSON string.
print json.load(response)
# now have some fun with the results...

这个结果并没有告诉受让人。我怎么才能得到它?


Google 专利 API 已弃用(“Google Patent Search API 已于 2011 年 5 月 26 日正式弃用。 https://developers.google.com/patent-search/”)。我认为你得到的数据并不可靠。

我不确定谷歌服务条款是否允许反对单独的谷歌专利页面,但一种策略可能是使用搜索来获取结果列表,然后使用类似的内容美丽的汤 http://www.crummy.com/software/BeautifulSoup/解析每个结果。

Example:

import urllib2
import json
from bs4 import BeautifulSoup

url = ('https://ajax.googleapis.com/ajax/services/search/patent?' +
       'v=1.0&q=barack%20obama')
request = urllib2.Request(url, None, {})
response = urllib2.urlopen(request)
jsonResponse = json.load(response)
responseData=jsonResponse['responseData']
results = responseData["results"]

print "This doesn't work, no assignee data..."
for result in results:
    print "patent no.: ", result["patentNumber"]
    print "assignee: ", result["assignee"]
    print " "

print "...but this seems to."
for result in results:
    URL = "https://www.google.com/patents/"+result["patentNumber"]
    req = urllib2.Request(URL, headers={'User-Agent' : "python"})
    _file = urllib2.urlopen(req)
    patent_html = _file.read()
    soup = BeautifulSoup(patent_html, 'html.parser')
    patentNumber = soup.find("span", { "class" : "patent-number" }).text
    assigneeMetaTag = soup.find("meta", { "scheme" : "assignee"})
    patentAssignee = assigneeMetaTag.attrs["content"]
    print "patent no.: ", patentNumber
    print "assignee: ", patentAssignee
    print " "

对我来说这打印出来:

This doesn't work, no assignee data...
patent no.:  US20110022394
assignee:

patent no.:  US20140089323
assignee:

patent no.:  US8117227
assignee:

patent no.:  CA2702937C
assignee:

...but this seems to.
patent no.:  US 20110022394 A1
assignee:  Thomas Wide

patent no.:  US 20140089323 A1
assignee:  Appinions Inc.

patent no.:  US 8117227 B2
assignee:  Scuola Normale Superiore Di Pisa

patent no.:  CA 2702937 C
assignee:  Neil S. Roseman

需要注意的是,我相信您只会在专利颁发之日起获得受让人;如果已转让,则不是当前受让人。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用Google专利api 的相关文章

随机推荐

  • 无法加载配置类

    我正在关注this http www tutorialspoint com spring spring java based configuration htm关于如何使用 Spring 的教程并根据提供的示例 我得到以下异常 Except
  • Yesod持久类型错误

    我正在 Yesod 应用程序中尝试持久化 我的模型文件包含 Job issuer MemberId addDate UTCTime lastDate UTCTime title Text description Text deriving
  • Xcode 5 中单元测试的使用

    我正在编写我的第一个更大的 iOS 项目 我想尽可能多地使用 Xcode 5 现在我想使用测试 但我以前从未这样做过 我的项目使用来Views和动态 TableViews 我怎样才能在代码中实现测试 使其有意义 请先观看 WWDC 13 会
  • 适合约 250,000 张图像的最佳 Web 文件夹结构

    我的网站将包含大约 200 000 张图像 每张图像将被存储 3 次 全尺寸 缩略图 更大缩略图 全尺寸图像约为 50Kb 至 500Kb 普通技术 VPS 上的 Linux Apache MySQL PHP 存储这些内容以便通过浏览器快速
  • 如何监视 JavaScript 中的递归函数

    Note 我已经看到这个问题以不同的方式提出并参考不同的测试工具 我认为清楚地描述问题和解决方案会很有用 我的测试是使用编写的诗乃间谍 https sinonjs org 为了可读性并将使用运行Jest https jestjs io en
  • 如何通过 TIdHTTP 下载大文件?

    我使用此代码下载小文件 Var ms TMemoryStream begin ms TMemoryStream Create Idhttp1 get http mydomain com myfile zip ms ms SaveToFile
  • 无法连接到 VS2012 中的 localDB –“建立与 SQL Server 的连接时发生网络相关或特定于实例的错误...”

    这很奇怪 因为我能够使用相同的连接字符串通过 SSMS 2008R2 连接到 localDB Data Source LocalDB v11 0 Integrated Security true Only C 代码无法连接 我尝试增加登录时
  • 创建流而无需从中创建物理文件

    我需要创建一个包含服务器上存在的文档的 zip 文件 我使用 Net Package 类来执行此操作 并创建一个新的 Package 即 zip 文件 我必须具有物理文件或流的路径 我试图不创建一个实际的 zip 文件 而是创建一个存在于内
  • makemessages 的 Unicode 问题 --all Django 1.6.2 Python 3.3

    升级项目Python 2 7 gt 3 3 1 and 姜戈1 4 gt 1 6 2 更新代码后我们的应用程序再次运行 in py3 翻译正在从 mo files 唯一的问题是我们的旧 po文件不能与 django admin py mak
  • 在 ASP.NET 5 中动态加载程序集

    我曾经有一些代码可以扫描bin我的应用程序的目录中包含尚未加载到 AppDomain 中并加载它们的程序集 它基本上看起来像 foreach var assemblyPath in Directory GetFiles path to bi
  • 根据字符串中多个单词的精确匹配转换新列

    我有一个数据框 df lt data frame Otherspp c suck SD BT SD RS RSS Dominantspp c OM OM RSS CH Commonspp c OM Rarespp c SD NP NP re
  • 什么是 print(f"...")

    我正在阅读一个 python 脚本 该脚本接受 XML 文件的输入并输出 XML 文件 但是 我不明白打印语法 有人可以解释一下吗f in print f does args parser parser args print f Input
  • 如何使用 Ruby CSV 转换器?

    假设您有以下文件 textfield datetimefield numfield foo 2008 07 01 17 50 55 004688 1 bar 2008 07 02 17 50 55 004688 2 读取 csv 的 Rub
  • 如何在 TCPDF 中设置下边距?

    我正在使用 TCPDF 生成 pdf 我可以使用设置左 上 右的边距SetMargins left top right 1 keepmargins false 但无法设置 pdf 页面底部的边距 任何人都可以帮助我在 TCPDF 中设置底部
  • Google Drive api 和服务帐户

    我为我的帐户创建了服务帐户 电子邮件受保护 cdn cgi l email protection 谷歌应用程序 和我的应用程序运行良好 然后我为我的个人帐户创建了服务帐户 电子邮件受保护 cdn cgi l email protection
  • 通过我们的应用程序使用“向朋友和家人汇款”功能

    我们的应用程序需要利用 向朋友和家人汇款 功能 现在我们可以使用 AdaptivePayments 执行个人支付 无需支付任何费用 如预期 但这种类型的交易似乎是购买交易 而不是 向家人和朋友汇款 交易 查看付款详细信息 而不是查看与 向朋
  • 如何用虚拟属性更新模型的属性?

    我有一个名为UserPrice其具有属性 purchase date a date select 在其表中 使用我的表单 我可以一次创建多个 user prices 但为了用户方便 我在我的表单中创建了一个虚拟属性UserPrice模型称为
  • 如果在 Woocommerce 中缺货(如果可变产品 - 如果所有变体都缺货),如何隐藏产品? [关闭]

    Closed 这个问题需要多问focused help closed questions 目前不接受答案 如果所有变体都缺货 我想隐藏某个产品 在 WooCommerce 中 如果您单击 隐藏目录中的库存商品 框 它会隐藏缺货的特定变体 当
  • 如何移植使用“${@:2}”?

    On 允许在变量赋值中使用 2 语法 https github com koalaman shellcheck issues 214他们说我不应该使用 2 因为它会破坏不同外壳的东西 我应该使用 2 反而 但使用 2 代替 2 是无稽之谈
  • 使用Google专利api

    我只是想使用 Python 和 Google 专利搜索 API 找出专利的所有者 import urllib2 import json url https ajax googleapis com ajax services search p