-
Notifications
You must be signed in to change notification settings - Fork 6
feat: apify get followers #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d for capability testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces comprehensive Apify integration for enhanced Twitter follower/following data collection, adding a new TwitterApifyJob type with robust infrastructure and improved argument validation across the codebase.
Key changes include:
- New Apify Twitter job type -
TwitterApifyJobwith dedicated client infrastructure for reliable follower/following scraping - Enhanced argument validation - Migrated to centralized type-safe unmarshalling from
tee-typesfor better validation and error handling - Intelligent job prioritization - Updated
DefaultScrapeStrategyto prioritize Apify for follower operations when available
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/client/apify_client.go |
New generic Apify API client with actor lifecycle management |
internal/jobs/twitterapify/ |
Complete Twitter-specific Apify integration module |
internal/jobs/twitter.go |
Major refactor with new scrape strategies and centralized argument validation |
internal/jobs/twitter_test.go |
Updated tests for new argument types and added Apify integration tests |
internal/jobs/webscraper.go |
Migrated to centralized argument unmarshalling |
tee/masa-tee-worker.json |
Added APIFY_API_KEY environment variable support |
mcamou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, let's do it! Thanks for your patience!
PR Description: Enhanced Twitter Apify Integration for Followers/Following Data Collection
Overview
This PR introduces comprehensive Apify integration to the Twitter scraping capabilities, adding a new job type specifically for retrieving Twitter follower and following data through Apify's premium actor services. This significantly enhances the platform's data collection capabilities with reliable, production-grade scraping infrastructure.
Key Improvements
🔧 New Twitter Apify Job Type
TwitterApifyJobas a new job type alongside existingTwitterJob,TwitterCredentialJob, andTwitterApiJobApifyScrapeStrategyfor handling Apify-specific operations🏗️ New Infrastructure Components
pkg/client/apify_client.go: Generic Apify API client with full actor lifecycle management (run, poll, retrieve results)internal/jobs/twitterapify/: Complete Twitter-specific Apify integration moduleclient.go: Twitter-specific Apify operations using the premium follower scraper actorscraper.go: High-level scraper interface for followers/following operations📊 Enhanced Data Collection
🔄 Improved Job Execution Strategy
DefaultScrapeStrategyto prioritize Apify for followers/following operations when availabletee-typesargument unmarshalling for better type validation⚙️ Configuration & Environment
APIFY_API_KEYenvironment variable support🧪 Testing & Quality Improvements
tee-typesstructures🛠️ Technical Debt Resolution
tee-typesImpact
This enhancement provides a robust, scalable alternative for Twitter data collection, particularly valuable for large-scale follower/following operations where Apify's premium infrastructure offers better reliability and compliance compared to direct scraping methods. The implementation maintains backward compatibility while adding powerful new capabilities.
Files Modified