Add x/followers domain skill (followers/profile scraping)#397
Open
MoayadAlismail wants to merge 1 commit into
Open
Add x/followers domain skill (followers/profile scraping)#397MoayadAlismail wants to merge 1 commit into
MoayadAlismail wants to merge 1 commit into
Conversation
Observed 73 unique on /followers (not ~50-60) + 23 verified = ~89 on a large account. Add the concurrent-daemon tab-stealing failure mode and the Target.createTarget(url=...) + js(target_id=...) pinning fix. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="agent-workspace/domain-skills/x/followers.md">
<violation number="1" location="agent-workspace/domain-skills/x/followers.md:67">
P1: Follower-harvesting loop uses `prev` before initialization, causing a `NameError` on the first iteration.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| for c in json.loads(js(EXTRACT)): | ||
| if c.get("at") and c["at"] not in seen: | ||
| seen[c["at"]] = c | ||
| new = len(seen) - prev; prev = len(seen) |
Contributor
There was a problem hiding this comment.
P1: Follower-harvesting loop uses prev before initialization, causing a NameError on the first iteration.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At agent-workspace/domain-skills/x/followers.md, line 67:
<comment>Follower-harvesting loop uses `prev` before initialization, causing a `NameError` on the first iteration.</comment>
<file context>
@@ -0,0 +1,105 @@
+ for c in json.loads(js(EXTRACT)):
+ if c.get("at") and c["at"] not in seen:
+ seen[c["at"]] = c
+ new = len(seen) - prev; prev = len(seen)
+ no_growth = no_growth + 1 if new == 0 else 0
+ js("window.scrollBy(0, 800)")
</file context>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
agent-workspace/domain-skills/x/followers.md— a playbook for reading other users' followers/following and profile data on X.Covers:
ct0+twid(auth_token is HttpOnly) and the login-wall redirect./followersfor a large account, plus ~23 from/verified_followers→ ~85–90 unique) — it's a per-request limit, not a soft-block.[data-testid="UserCell"](preferred over GraphQL), with the small-step (~800px / 1.4s) scroll pattern needed because X virtualizes the list.Target.createTarget(url=...)/js(..., target_id=...)pinning fix (hit live when another agent shared the daemon).🤖 Generated with Claude Code
Summary by cubic
Adds
agent-workspace/domain-skills/x/followers.md, a practical guide for scraping X followers/following and profile data via the DOM. It clarifies auth checks, the real pagination cap, reliable selectors, and a fix for shared-daemon tab stealing.ct0+twidand the login-wall redirect check./followersplus ~20 from/verified_followers(~85–90 unique);followingsimilar.Target.createTarget(...)+js(..., target_id=...); includes guidance to avoid collecting avatars.Written for commit 1281796. Summary will update on new commits.