{"id":28826510,"url":"https://github.com/yashukun/fs-ldin","last_synced_at":"2026-04-17T05:03:36.202Z","repository":{"id":299464445,"uuid":"1001685172","full_name":"yashukun/FS-LDIN","owner":"yashukun","description":"AI-powered LinkedIn comment generator with FastAPI, Selenium-based post extraction, and multiple model strategies.","archived":false,"fork":false,"pushed_at":"2025-06-16T17:14:50.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-16T18:31:23.796Z","etag":null,"topics":["fastapi","huggingface","linkedin","openai","selenium-python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yashukun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-13T20:18:05.000Z","updated_at":"2025-06-16T17:14:54.000Z","dependencies_parsed_at":"2025-06-16T18:32:47.478Z","dependency_job_id":"7cf3a881-e16a-4f01-b95d-3e32e0f55165","html_url":"https://github.com/yashukun/FS-LDIN","commit_stats":null,"previous_names":["yashukun/fs-ldin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yashukun/FS-LDIN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashukun%2FFS-LDIN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashukun%2FFS-LDIN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashukun%2FFS-LDIN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashukun%2FFS-LDIN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yashukun","download_url":"https://codeload.github.com/yashukun/FS-LDIN/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashukun%2FFS-LDIN/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260676937,"owners_count":23045115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","huggingface","linkedin","openai","selenium-python"],"created_at":"2025-06-19T03:04:46.143Z","updated_at":"2026-04-17T05:03:36.179Z","avatar_url":"https://github.com/yashukun.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LinkedIn Comment Generator\n\nThis project provides an automated system to generate thoughtful, professional comments for LinkedIn posts using AI models (OpenAI or HuggingFace). It includes a FastAPI backend, LinkedIn post caption extraction via Selenium, and multiple comment generation strategies.\n\n## Features\n\n- **Extract LinkedIn Post Captions:** Uses Selenium (with stealth options) to fetch post content.\n- **AI-Powered Comment Generation:** Supports both OpenAI (e.g., GPT-4o) and HuggingFace (e.g., Mixtral-8x7B) models.\n- **REST API:** FastAPI endpoint for easy integration.\n- **Customizable Prompts:** Generates comments with different tones and perspectives.\n- **Command-Line \u0026 Script Usage:** Includes scripts for direct use and testing.\n\n## Requirements\n\n- Python 3.8+\n- Google Chrome (for Selenium)\n- The following Python packages (see `requirements.txt`):\n  - fastapi\n  - uvicorn\n  - pydantic\n  - requests\n  - openai\n  - torch\n  - transformers\n  - selenium\n  - selenium-stealth\n  - undetected-chromedriver\n\n## Setup\n\n1. **Install dependencies:**\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n2. **Set up ChromeDriver:**  \n   Ensure ChromeDriver is installed and matches your Chrome version.\n\n3. **API Keys:**\n   - For OpenAI: Get your API key from [OpenAI](https://platform.openai.com/).\n   - For HuggingFace: Get your token from [HuggingFace](https://huggingface.co/settings/tokens).\n\n## Usage\n\n### 1. Run the FastAPI Server\n\n```bash\nuvicorn main:app --reload\n```\n\n- **Endpoint:** `POST /linkedin-comment`\n- **Request Body:**\n  ```json\n  {\n    \"post_url\": \"LINKEDIN_POST_URL_HERE\",\n    \"provider\": \"openai\" or \"hf\",\n    \"token\": \"YOUR_API_TOKEN\"\n  }\n  ```\n\n### 2. Command-Line Script\n\nGenerate a comment directly:\n\n```bash\npython generate_comment.py --post_url \"LINKEDIN_POST_URL\" --provider openai --token YOUR_API_TOKEN\n```\n\n## File Overview\n\n- `main.py` - FastAPI backend for comment generation.\n- `generate_comment.py` - Functions for generating comments using OpenAI or HuggingFace.\n- `get_post_caption.py` - Extracts post captions from LinkedIn using Selenium.\n\n## Notes\n\n- LinkedIn’s HTML structure may change; update selectors in `get_post_caption.py` as needed.\n- For best results, use valid API tokens and ensure your environment supports Selenium.\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashukun%2Ffs-ldin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyashukun%2Ffs-ldin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashukun%2Ffs-ldin/lists"}