{"id":19451647,"url":"https://github.com/mrdotparasyte/reX","last_synced_at":"2025-04-25T04:30:27.840Z","repository":{"id":194603513,"uuid":"689714725","full_name":"mrdotparasyte/reX","owner":"mrdotparasyte","description":"Reverse Engineered Twitter's API","archived":false,"fork":false,"pushed_at":"2023-10-06T10:40:00.000Z","size":189,"stargazers_count":75,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T15:52:30.120Z","etag":null,"topics":["reverse-engineering","scraper","twitter","twitter-api","twitter-api-v2","twitter-scraper","twitterscraper"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mrdotparasyte.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}},"created_at":"2023-09-10T17:19:05.000Z","updated_at":"2025-02-03T10:24:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd3fa45f-77f2-4d67-960b-78b537e9b66f","html_url":"https://github.com/mrdotparasyte/reX","commit_stats":null,"previous_names":["amovane/reversedx","zmovane/rex","amovane/rex","yoosoftcc/rex","mrdotparasyte/rex"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdotparasyte%2FreX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdotparasyte%2FreX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdotparasyte%2FreX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdotparasyte%2FreX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrdotparasyte","download_url":"https://codeload.github.com/mrdotparasyte/reX/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250754521,"owners_count":21481829,"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":["reverse-engineering","scraper","twitter","twitter-api","twitter-api-v2","twitter-scraper","twitterscraper"],"created_at":"2024-11-10T16:42:33.067Z","updated_at":"2025-04-25T04:30:27.575Z","avatar_url":"https://github.com/mrdotparasyte.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reX\n\n[![go report card](https://goreportcard.com/badge/github.com/amovane/reX \"go report card\")](https://goreportcard.com/report/github.com/amovane/reX)\n[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./twitter.png\" height=150\u003e\u003c/img\u003e\n\u003c/p\u003e\n\nSince twitter dev removed the API for accessing user followers and following, developers have found it difficult to obtain this data. Here, I'm sharing my reverse engineering solution. If it's helpful to you, please let me know.\n\n## Installation\n\n```\ngo get -u github.com/amovane/reX\n```\n\n## Login\n\n```golang\nuname := os.Getenv(\"USER_NAME\")\nupwd := os.Getenv(\"PASSWORD\")\nx := reX.New()\nwd, _ := os.Getwd()\ncookiesPath := fmt.Sprintf(\"%s/cookies.json\", wd)\nerr := x.SetCookies(cookiesPath)\nif err != nil || !x.IsLoggedIn() {\n    println(\"You must login first\")\n    x.Login(uname, upwd)\n    x.SaveCookies(cookiesPath)\n}\n```\n\n## Followings\n\n```golang\nvar cursor *string\nvar tweets []reX.UserResults\nfor {\n    tweets, cursor, err = x.GetFollowingsByScreenName(\"shareverse_\", cursor)\n    for _, tweet := range tweets {\n        println(tweet.Result.Legacy.ScreenName)\n    }\n    if cursor == nil || err != nil {\n        break\n    }\n}\n```\n\n## Followers\n\n```golang\nvar cursor *string\nvar tweets []reX.UserResults\nfor {\n    tweets, cursor, err = x.GetFollowerssByScreenName(\"shareverse_\", cursor)\n    for _, tweet := range tweets {\n        println(tweet.Result.Legacy.ScreenName)\n    }\n    if cursor == nil || err != nil {\n        break\n    }\n}\n```\n\n## Is following\n\n```golang\nuid, _ := x.GetUserIDByScreenName(\"jarredsumner\")\nuidOfFollower, _ := x.GetUserIDByScreenName(\"cybermageek\")\nisFollowing := x.IsFollowing(uid, uidOfFollower)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdotparasyte%2FreX","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrdotparasyte%2FreX","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdotparasyte%2FreX/lists"}