当前位置: 首页 > Skill >

dataify-reddit-posts

dataify-reddit-posts

dataify-reddit-posts

提交 Dataify Reddit 帖子信息构建器任务,涵盖三种 Reddit 帖子收集模式。在用户需要收集 Reddit 帖子信息时使用。

1.2.0 2026.11.19 545
获取Skill文件查看使用说明
作 者:陆言 许可证: 更新时间:2026.11.19
本文目录展开

Dataify Reddit Posts

Submit Reddit post information collection jobs through Dataify Builder. This skill is a guided wrapper for three collection modes:

Mode Collector ID Use For
Post URL reddit_posts_by-url Collecting one or more Reddit posts by post URL.
Keyword reddit_posts_by-keywords Collecting Reddit posts by search keyword.
Subreddit URL reddit_posts_by-subredditurl Collecting Reddit posts from a subreddit URL with sort and time options.

After a successful submission, give the user the task_id, the returned or inferred status, and tell them to visit Dataify to view results.

API TOKEN Handling

Use DATAIFY_API_TOKEN as the long-term saved token name.

  • If the user provides a token in the request, use it for this run.
  • If no token is provided, first check whether DATAIFY_API_TOKEN is already saved locally in the environment.
  • If DATAIFY_API_TOKEN is saved locally, use it without asking the user to re-enter the token.
  • If no token is available locally, tell the user they need to provide a Dataify API TOKEN.
  • If the user does not have an API TOKEN, tell them they can register or log in at Dataify to get one.
  • If the user already has an API TOKEN, tell them it is available in the top-right area of Dataify.
  • After the user provides an API TOKEN and no local DATAIFY_API_TOKEN is saved, ask whether they want to save it locally as DATAIFY_API_TOKEN for future use.
  • If the user wants to save it, give the appropriate command for their shell and ask them to run it; do not silently persist tokens without confirmation.
  • Do not call the Builder endpoint without a token.
  • Always call it API TOKEN in user-facing instructions. Prefer the environment variable name DATAIFY_API_TOKEN for saved local use.

PowerShell examples for saving the token for the current session:

$env:DATAIFY_API_TOKEN = "YOUR_DATAIFY_API_TOKEN"

For a persistent user-level variable on Windows:

[Environment]::SetEnvironmentVariable("DATAIFY_API_TOKEN", "YOUR_DATAIFY_API_TOKEN", "User")

Core Workflow

  1. First ask the user to choose a collection mode: url, keywords, or subredditurl.
  2. After the user chooses a mode, show only that mode's parameter table and defaults.
  3. If the selected mode has dropdown fields, show the dropdown options as Markdown tables with Label and Value columns.
  4. Ask whether the user wants to change any value before running the task.
  5. Ask whether the user wants to collect multiple Reddit post groups for the selected mode.
  6. Normalize the final values into a list of parameter objects for the selected mode only.
  7. Resolve the Dataify token from explicit input or saved DATAIFY_API_TOKEN.
  8. If no token is available, ask the user to enter their API TOKEN and ask whether to save it as DATAIFY_API_TOKEN.
  9. Validate the selected mode, URLs, numeric values, dropdown values, and file name.
  10. Submit the Builder request with the selected mode's spider_id.
  11. Read data.task_id from the Builder response and read data.status or status when present.
  12. Stop after Builder succeeds.
  13. Tell the user to visit Dataify to view or manage results.

Mode Selection

When the user invokes this skill, first show this Markdown table and ask them to choose one mode:

Label Value
Collect Reddit posts by post URL url
Collect Reddit posts by keyword keywords
Collect Reddit posts by subreddit URL subredditurl

Ask: "Which collection mode do you want to use: url, keywords, or subredditurl?"

Do not submit a Builder request until the mode is clear.

Post URL Mode Parameters

Use this section only when the user chooses url.

Field Required Default Location Notes
url Yes https://www.reddit.com/r/battlefield2042/comments/1cmqs1d/official_update_on_the_next_battlefield_game/ spider_parameters Reddit post URL.
file_name No {{TasksID}} Builder form field Use the default when the user does not change it.

Then ask: "Do you want to change any of these values before I submit the task?"

Also ask: "Do you want to collect multiple Reddit post URL groups? If yes, provide multiple url values."

Post URL mode handling:

  • url is required. If the user does not provide it, use the default https://www.reddit.com/r/battlefield2042/comments/1cmqs1d/official_update_on_the_next_battlefield_game/ only after showing it in the parameter confirmation table.
  • Trim leading and trailing whitespace from url.
  • url cannot be empty.
  • url must start with https://www.reddit.com/.
  • Submit spider_id=reddit_posts_by-url.
  • Submit spider_parameters as a JSON string containing one or more objects like:
[{"url":"https://www.reddit.com/r/battlefield2042/comments/1cmqs1d/official_update_on_the_next_battlefield_game/"}]

Keyword Mode Parameters

Use this section only when the user chooses keywords.

Field Required Default Location Notes
keyword Yes datascience spider_parameters Reddit post search keyword.
num_of_posts No 10 spider_parameters Maximum number of posts to collect. Must be an integer greater than or equal to 0.
file_name No {{TasksID}} Builder form field Use the default when the user does not change it.

Then ask: "Do you want to change any of these values before I submit the task?"

Also ask: "Do you want to collect multiple Reddit keyword groups? If yes, provide multiple groups with keyword and num_of_posts."

Keyword mode handling:

  • keyword is required. If the user does not provide it, use the default datascience only after showing it in the parameter confirmation table.
  • Trim leading and trailing whitespace from keyword.
  • keyword cannot be empty.
  • num_of_posts must be an integer greater than or equal to 0.
  • Submit spider_id=reddit_posts_by-keywords.
  • Submit spider_parameters as a JSON string containing one or more objects like:
[{"keyword":"datascience","num_of_posts":"10"}]

Subreddit URL Mode Parameters

Use this section only when the user chooses subredditurl.

Field Required Default Location Notes
url Yes https://www.reddit.com/r/battlefield2042 spider_parameters Subreddit URL.
sort_by No Hot spider_parameters Post sort option.
num_of_posts No 10 spider_parameters Maximum number of posts to collect. Must be an integer greater than or equal to 0.
sort_by_time No Now spider_parameters Time sort option. Time fields do not take effect with Hot and New.
file_name No {{TasksID}} Builder form field Use the default when the user does not change it.

Dropdown options for sort_by:

Label Value
Hot Hot
Top Top
New New
Rising Rising

Dropdown options for sort_by_time:

Label Value
Now Now
Today Today
This Week This Week
This Month This Month
This Year This Year
All Time All Time

Then ask: "Do you want to change any of these values before I submit the task?"

Also ask: "Do you want to collect multiple Reddit subreddit URL groups? If yes, provide multiple groups with url, sort_by, num_of_posts, and sort_by_time."

Subreddit URL mode handling:

  • url is required. If the user does not provide it, use the default https://www.reddit.com/r/battlefield2042 only after showing it in the parameter confirmation table.
  • Trim leading and trailing whitespace from url.
  • url cannot be empty.
  • url must start with https://www.reddit.com/.
  • sort_by must be one of Hot, Top, New, or Rising.
  • sort_by_time must be one of Now, Today, This Week, This Month, This Year, or All Time.
  • num_of_posts must be an integer greater than or equal to 0.
  • Time fields do not take effect with Hot and New; keep the submitted value if the user provides it.
  • Submit spider_id=reddit_posts_by-subredditurl.
  • Submit spider_parameters as a JSON string containing one or more objects like:
[{"url":"https://www.reddit.com/r/battlefield2042","sort_by":"Rising","num_of_posts":"10","sort_by_time":"Now"}]

Shared File Name Handling

  • file_name defaults to {{TasksID}}.
  • If the user changes file_name, submit the user-provided value.
  • file_name cannot be empty.
  • Send file_name as a Builder form field.

Dataify Builder Request

Use form fields rather than hand-built URL-encoded strings.

  • URL: https://scraperapi.dataify.com/builder?platform=1
  • Method: POST
  • Authorization header: Bearer DATAIFY_API_TOKEN
  • Content type: application/x-www-form-urlencoded
  • Fixed fields:
    • spider_name=reddit.com
    • spider_errors=true
  • Mode-specific field:
    • Post URL mode: spider_id=reddit_posts_by-url
    • Keyword mode: spider_id=reddit_posts_by-keywords
    • Subreddit URL mode: spider_id=reddit_posts_by-subredditurl
  • Default field:
    • file_name={{TasksID}}
  • Dynamic field:
    • spider_parameters must be a JSON string array.

Script

For stable execution, prefer scripts/submit_dataify_reddit_posts.py with Python 3.6 or newer instead of rewriting the Builder flow.

Post URL mode:

python3 ".scriptssubmit_dataify_reddit_posts.py" --mode url --url "https://www.reddit.com/r/battlefield2042/comments/1cmqs1d/official_update_on_the_next_battlefield_game/"

Keyword mode:

python3 ".scriptssubmit_dataify_reddit_posts.py" --mode keywords --keyword "datascience" --num-of-posts "10"

Subreddit URL mode:

python3 ".scriptssubmit_dataify_reddit_posts.py" --mode subredditurl --url "https://www.reddit.com/r/battlefield2042" --sort-by "Rising" --num-of-posts "10" --sort-by-time "Now"

To override the saved environment token or file name:

python3 ".scriptssubmit_dataify_reddit_posts.py" --api-token "YOUR_DATAIFY_API_TOKEN" --mode keywords --keyword "datascience" --file-name "{{TasksID}}"

To submit multiple post URL groups:

python3 ".scriptssubmit_dataify_reddit_posts.py" --mode url --params-json '[{"url":"https://www.reddit.com/r/battlefield2042/comments/1cmqs1d/official_update_on_the_next_battlefield_game/"},{"url":"https://www.reddit.com/r/battlefield2042/comments/1cmqs1d/official_update_on_the_next_battlefield_game/"}]'

To submit multiple keyword groups:

python3 ".scriptssubmit_dataify_reddit_posts.py" --mode keywords --params-json '[{"keyword":"datascience","num_of_posts":"10"},{"keyword":"machinelearning","num_of_posts":"10"}]'

To submit multiple subreddit URL groups:

python3 ".scriptssubmit_dataify_reddit_posts.py" --mode subredditurl --params-json '[{"url":"https://www.reddit.com/r/battlefield2042","sort_by":"Rising","num_of_posts":"10","sort_by_time":"Now"},{"url":"https://www.reddit.com/r/battlefield2042","sort_by":"Rising","num_of_posts":"10","sort_by_time":"Now"}]'

The script prints a JSON summary with mode, spider_id, task_id, status, parameters, file_name, dashboard_url, and message.

Troubleshooting

Missing Dataify API TOKEN means no explicit token was passed and DATAIFY_API_TOKEN is not saved locally. Tell the user they need to provide their Dataify API TOKEN, ask whether they want to save it as DATAIFY_API_TOKEN, or tell them they can register or log in at Dataify to get one. If they already have a token, tell them it is in the top-right area of Dataify.

Unsupported mode means the mode must be url, keywords, or subredditurl.

url cannot be empty means the Reddit URL is missing.

url must start with https://www.reddit.com/ means the URL is outside the allowed Reddit domain.

keyword cannot be empty means the Reddit keyword is missing.

num_of_posts must be an integer greater than or equal to 0 means the post count is invalid.

sort_by must be one of Hot, Top, New, Rising means the subreddit sort option is invalid.

sort_by_time must be one of Now, Today, This Week, This Month, This Year, All Time means the subreddit time option is invalid.

File name cannot be empty means no usable file_name was provided.

Necessary parameters is empty! usually means the Builder request was not submitted as form fields, spider_parameters was not a JSON string array, or the selected mode's object is missing required fields.

Missing task_id usually means the authorization header, token, spider_name, selected spider_id, or spider_parameters is wrong.

Guardrails

  • Do not mix Post URL, Keyword, and Subreddit URL mode parameters in the same Builder request.
  • Do not submit a Builder request until the mode is clear.
  • Do not put file_name inside spider_parameters.
  • Do not use a Reddit URL from outside https://www.reddit.com/.
  • Use only API TOKEN and DATAIFY_API_TOKEN when referring to authentication.
  • Do not hard-code local Python paths.
  • Do not invent result fields.
  • Always direct the user to Dataify after successful task creation.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,036
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,020
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,019
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,016
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,014
Skill 文件
  • SKILL.md
    • Dataify Reddit Posts
    • API TOKEN Handling
    • Core Workflow
    • Mode Selection
    • Post URL Mode Parameters
    • Keyword Mode Parameters
    • Subreddit URL Mode Parameters
    • Shared File Name Handling
    • Dataify Builder Request
    • Script
    • Troubleshooting
    • Guardrails
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期