twitter - 英国的 Twitter Profile Geo Enrichment
问题描述
在 Twitter API 文档的高级运算符部分中,它们具有可用于根据 Profile Geo Enrichment 数据进行过滤的运算符。特别是,您可以按 profile_region 进行过滤。一个示例profile_region:"Zurich"
按预期返回来自苏黎世用户的推文。但是,profile_region:"London"
两者profile_region:"Greater London"
都导致请求返回 0 结果。(每月)可以提出的这些请求数量的限制使我不敢继续尝试,直到它成功为止。
我已经搜索了 Twitter 文档、gnip.com 上 API 的旧文档以及 GeoNames.org 以尝试查找 Twitter 对英国地区的定义或只是英国某个地方的示例,但均未成功.
我还使用用户/搜索 API 收集位于伦敦的用户的 user_objects 以查找派生字段(应包含 Profile Geo Enriched 数据),但发现此字段丢失。
解决方案
有许多“级别”来描述地理:
profile_region
profile_subregion
profile_locality
如果你使用profile_locality:London
你会看到不同的结果(或profile_subregion:"Greater London"
)。伦敦对象如下所示:
{
"locations": [
{
"country": "United Kingdom",
"country_code": "GB",
"locality": "London",
"region": "England",
"sub_region": "Greater London",
"full_name": "London, England, United Kingdom",
"geo": {
"coordinates": [
-0.12574,
51.50853
],
"type": "point"
}
}
]
}
推荐阅读
- string - 如何在进行中执行基本的字符串处理
- ubuntu - 将 Eclipse Che 暴露给外部客户端
- java - 如何将整数列表作为 json 数据传递给 Spring Boot Rest API?
- emacs - ./emacs.d/init.ls 文件中的自定义 4 空格缩进使用 8 个空格执行
- javascript - 赛普拉斯中的路径变量
- visual-studio-code - DocumentRoot 和 VSCode 连接
- swift - 如何将子视图添加到我的 stackView?我试试看,但我看不到它们
- dask - 在 dask 集群上运行自身的多线程函数
- python - 创建类似于 scipy 的 OptimizedResult 的数据类型
- python - Python get-pip.py 失败,因为站点包不可写且 SSL 不可用,虽然它们看起来不错