【问题标题】:How to get Domain Authority from http://moz.com using GET request?如何使用 GET 请求从 http://moz.com 获取域权限?
【发布时间】:2014-10-25 13:17:06
【问题描述】:

我想从“moz.com”获取域权限值(没有找到其他来源)。 有时页面无法正确加载,并且来自 moz.com 的响应没有我解析的正确 dom 元素。可能页面使用 javascript 来显示值。它也有限制,不能分析超过3次/天(我需要每天最多访问一次)

require 'rest-client'
require 'nokogiri'

link_url = "http://google.com"
api_url  = "http://moz.com/researchtools/ose/links?site="
response = RestClient.get(api_url + link_url.split("?").first)
value    = Nokogiri::HTML(response).css('.url-metrics-authority span.large').first.text.strip #previously there was Nokogiri::HTML(response).css('.metrics-authority').first.text.strip
pp value

从运行良好的控制台,但是当我使用 ruby​​ 脚本运行它时,它失败了。 我可以以某种方式等待 js 执行还是有任何其他来源获得域权限?

【问题讨论】:

  • 不能改用他们的 API 吗?
  • 已付费。它包含了很多请求,我不需要那么多。

标签: html ruby rest seo


【解决方案1】:

您可以使用 Moz 提供的免费 URL Metrics API 获取任何网站/URL 的域权限。您将需要 AccessId 和 Secret 密钥来使用 Mozscape API。我建议您围绕 Moz API 构建一个包装器 API to get Moz Domain Authority,以便您可以从 Javascript 中使用包装器 API。

【讨论】:

    【解决方案2】:

    我是 Russ Jones,是 Moz 的顾问。我还帮助构建了最新版本的 Domain Authority。

    collecting Domain Authority is here 的相应文档

    获取API Key is free 并允许每月进行 2,500 次查找,每 10 秒不超过 1 次。付费访问起价为 250 美元/月,包括每月 120,000 行,限制明显减少。

    【讨论】:

    • 它还免费吗?好像有一个免费的试用,试用结束后价格会涨到 250 美元/月...
    猜你喜欢
    • 2013-11-01
    • 2018-12-15
    • 2021-06-04
    • 2016-09-14
    • 1970-01-01
    • 2012-11-25
    • 2017-12-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多