본문으로 건너뛰기
cccskills
무료GitHub에 공개

agent-generated-mediahost-coding-agent

Reusable skill for coding agents to build mediahost integrations, API clients, scrapers, bulk downloaders, and media tools. Incorporates the unofficial Python wrapper, auth flow, endpoints, rate-limit handling, and cross-language patterns ...

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Reddit
설치 방법 보기

포함된 파일(1)

  • SKILL.md5.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

mediahost Coding Agent Skill

Purpose: When the user asks you to write code involving mediahost (searching GIFs, downloading videos, building bots, API wrappers, or media pipelines), follow this recipe exactly. Always prioritize the community-maintained mediahost Python library unless the user specifies another language.

Core Principles

  • Use the official community wrapper first: pip install -U mediahost
  • All access is reverse-engineered (no official public developer portal).
  • Temporary token auth is mandatory and short-lived.
  • Expect rate limits (429 on /auth/temporary); implement exponential backoff + retries.
  • Always set a proper User-Agent matching the library: mediahost (https://github.com/scrazzz/mediahost {version}) Python/{pyver}.
  • Support both sync and async patterns.
  • For bulk or high-volume work, add delays and respect CDN hotlinking blocks.
  • Output code that is installable, runnable, and includes error handling for auth failures and rate limits.
  • Warn about restricted content, Terms of Service compliance, and responsible use.

Primary Reference (Always Consult First)

Authentication Flow (Mandatory First Step)

  1. GET https://api.mediahost.com/v2/auth/temporary with header Accept: application/json
  2. Extract token from response.
  3. Pass to API.login() or use as Authorization: Bearer <token>.
  4. Token is temporary — refresh on 401/429.

Example skeleton:

from mediahost import API
api = API()
api.login()  # handles temporary token internally

Key Methods (from API class)

  • api.search(tags="...", order=Order.TopThisWeek, count=80) → SearchResult
  • api.get_gif(gif_id) → GIF model with hd_url, sd_url, thumbnail
  • api.get_trending_gifs()
  • api.get_top_this_week()
  • api.search_creators(username)
  • api.fetch_tag_suggestions(query)
  • Async equivalent: mediahost.aio.API

Models: GIF, Image, SearchResult, CreatorsResult, User.

Enums: Order (TopThisWeek, etc.), MediaType (g for GIF, i for image).

CLI Usage (for quick testing)

After install: mediahost --help or mediahost download <url or id>

Custom / Low-Level Patterns (when wrapper insufficient)

Reference the gist infrastructure analysis (https://gist.github.com/devinschumacher/54e082d8bdb907aa669036cabe51634f) for:

  • CDN/stream URL patterns
  • Signature requirements (some endpoints combine IP + UA)
  • Direct media extraction without full library
  • Fallbacks when hotlinking is blocked

From raw http.py: concrete routes include:

  • /v2/gifs/{id}
  • /v2/gifs/search?type=g&order=...&tags=...
  • /v2/explore/trending-gifs
  • /v2/users/{username}
  • /v2/niches/search

Always include the library's UA to avoid 403s.

Handling Common Issues

  • 429 Rate Limit on auth: sleep 5-30s + retry with backoff. Cache tokens when possible.
  • API changes (2022+): signature requirements; monitor Reddit r/learnpython or r/DataHoarder for breakage.
  • Hotlinking blocked: download via library methods or use yt-dlp/gallery-dl extractors (they have mediahost support).
  • Async for scale: use mediahost.aio + asyncio.gather for bulk downloads.

Cross-Language Alternatives

Example Agent Output Structure

When generating code for the user:

  1. Show pip install command.
  2. Provide complete runnable example (login + search + download one item).
  3. Include comments referencing the sources above.
  4. Add rate-limit and error handling.
  5. Provide async version if bulk work is requested.
  6. Suggest testing with small counts first.

Related Ecosystem

  • yt-dlp and gallery-dl have mediahost extractors (check their GitHub issues for current token handling).
  • Apify actors for bulk scraping.
  • Reddit bots (e.g. restricted-mediahost-Reddit-Bot) for posting automation examples.

Limitations & Ethics

  • No official API key or stable public docs.
  • Frequent breaking changes — always verify against current GitHub repo.
  • This skill is for educational / personal tooling only. Respect mediahost TOS, rate limits, and do not build abusive scrapers.
  • All media is adult/restricted — handle responsibly.

How to Extend This Skill

If user asks for new features (e.g. niche search, creator following, custom signatures), first check the latest mediahost repo, then implement using the http.py patterns or subclass the API class.

Citations: All URLs and details above were returned by the deep research sub-agent in this session (GitHub, ReadTheDocs, PyPI, Gist, Reddit, Stack Overflow). Never invent endpoints.

This skill makes any coding agent immediately productive with mediahost without hallucinating the auth flow or endpoints.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Reusable skill for coding agents (Claude, GPT, etc.) to build, optimize, debug, and productionize AI agents and coding agents in Rust. Embeds Rig/ADK patterns, Tokio async architecture, tracing observability, performance techniques, erro...

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OthmanAdi/OpenMark102026년 7월 28일 업데이트

Remove AI-generated writing patterns from Egyptian Arabic (عامية مصرية / Masri) text. Use when editing or reviewing Egyptian dialect text to make it sound authentically human-written.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OthmanAdi/OpenMark102026년 7월 28일 업데이트

Remove AI-generated writing patterns from Modern Standard Arabic (MSA/الفصحى) text. Use when editing or reviewing Arabic formal text to make it sound naturally human-written.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OthmanAdi/OpenMark102026년 7월 28일 업데이트

Remove AI-generated writing patterns from Levantine Arabic (الشامي — Syrian, Lebanese, Palestinian) text. Use when editing or reviewing Levantine dialect text to make it sound authentically human-written.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OthmanAdi/OpenMark102026년 7월 28일 업데이트

Remove AI-generated writing patterns from Modern Hebrew (עברית מודרנית) text. Use when editing or reviewing Hebrew text to make it sound naturally human-written.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OthmanAdi/OpenMark102026년 7월 28일 업데이트

Take ONE specific bookmark URL and explore the neighborhood around it — tags, SIMILAR_TO neighbors, community peers — plus optionally WebFetch the page itself to summarize it. Use whenever Ahmad pastes a single URL and asks "what's near this", "tell me about this one", "expand this bookmark", "dig into this", "what else did I save like this", "give me the context for this URL". Triggers on "expand", "neighbors of", "what else like this", "dig into this URL", "context for this", and any message that's just a URL plus a short prompt.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OthmanAdi/OpenMark102026년 7월 28일 업데이트

OthmanAdi의 스킬 모두 보기

이 스킬의 문제 신고