Skip to content

Automate Instagram posts via a new scraper #45

@tkodev

Description

@tkodev

Background

constants/instagram-posts.ts stores all Instagram posts as a static, hand-maintained record. Every time a new post goes live on @techtankto, someone has to manually add the entry and commit the file.

Goal

Build a scraper that fetches new posts from the techtankto Instagram account and writes them into (or alongside) instagram-posts.ts, so the feed stays current without manual intervention.

Acceptance criteria

  • Scraper fetches posts from the techtankto Instagram account
  • Output matches the existing InstagramPost schema (caption, date, shortcode, pk, createdAtRaw, media)
  • Media assets are downloaded and saved to /public/media/instagram/<slug>/
  • New posts are merged into constants/instagram-posts.ts without overwriting existing entries
  • Scraper can be run locally (e.g. pnpm scrape:instagram) and as a scheduled CI job

Notes

  • Review the existing InstagramPost / InstagramPostMedia interfaces in constants/instagram-posts.ts before writing the schema mapping.
  • Prefer an official or well-maintained library (e.g. instagrapi, apify, or the Instagram Basic Display API) over brittle HTML scraping.
  • If using an API that requires credentials, document the required env vars in .env.example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions