Skip to content
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

fix(twitter): update package and follower response type to Profile #638

Conversation

teslashibe
Copy link
Contributor

Title: Update TwitterScraper Package Follower Response Type

Description:
Updates the Twitter Scraper package to use: https://pkg.go.dev/github.com/imperatrona/twitter-scraper and updated the follower scraping functionality to use the correct return type from the imperatrona/twitter-scraper package. This change:

  • Fix login error with changes to Twitter verification endpoint
  • Switches from masa-finance to imperatrona twitter-scraper package
  • Updates return type to []*Profile to match the package API
  • Maintains backward compatibility with existing functionality

Testing:

  • Verified follower scraping works with new type system
  • Confirmed compatibility with existing code paths

- Update twitterscrpaer package
- Change return type from Legacy to *Profile to match twitter-scraper API
- Update import to use imperatrona/twitter-scraper package
- Fix type compatibility with FetchFollowers method
@teslashibe teslashibe requested a review from mcamou November 26, 2024 16:51
Copy link

PR description is too short and seems to not fulfill PR template, please fill in

@mcamou
Copy link
Contributor

mcamou commented Nov 26, 2024

@mudler this affects masa-finance/tee-worker#13

@teslashibe teslashibe merged commit eaa4303 into main Nov 26, 2024
10 of 11 checks passed
@teslashibe teslashibe deleted the fix(twitter)-update-twitterscraper-package-and-follower-response-type-to-Profile branch November 26, 2024 16:57
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.

Project coverage is 12.41%. Comparing base (bf277c6) to head (898a82e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/scrapers/twitter/cookies.go 0.00% 27 Missing ⚠️
pkg/scrapers/twitter/followers.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #638      +/-   ##
==========================================
- Coverage   12.46%   12.41%   -0.05%     
==========================================
  Files          93       93              
  Lines        6739     6766      +27     
==========================================
  Hits          840      840              
- Misses       5823     5850      +27     
  Partials       76       76              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

mudler pushed a commit that referenced this pull request Dec 3, 2024
)

- Update twitterscrpaer package
- Change return type from Legacy to *Profile to match twitter-scraper API
- Update import to use imperatrona/twitter-scraper package
- Fix type compatibility with FetchFollowers method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants