هذا الدليل يوضح لك خطوة بخطوة كيفية تفعيل سكربت بايثون يقوم بمتابعة جميع متابعين أي حساب على منصة Bluesky بشكل أوتوماتيكي.
الشرح مناسب للمبتدئين ويحتوي على كل التفاصيل مع توضيح الأخطاء الشائعة.
atproto
عبر الأمر التالي:pip install atproto
انسخ الكود التالي بالكامل والصقه في ملف جديد مثلاً باسم bluesky_auto_follow.py
:
import time from atproto import Client USERNAME = "yourname.bsky.social" # غيّر هنا: اسم حسابك على Bluesky (وليس بريدك الإلكتروني) PASSWORD = "كلمة_السر_الخاصة_بك" # غيّر هنا: كلمة سر حسابك TARGET_HANDLE = "jack.bsky.social" # غيّر هنا: اسم الحساب الذي تريد متابعة متابعيه DELAY_SECONDS = 2 # تأخير بين كل متابعة لتفادي الحظر def main(): client = Client() client.login(USERNAME, PASSWORD) print(f"تم تسجيل الدخول باسم: {USERNAME}") target_profile = client.com.atproto.identity.resolve_handle({'handle': TARGET_HANDLE}) target_did = target_profile.did print(f"الحساب المستهدف DID: {target_did}") followers = [] cursor = None while True: params = {'actor': target_did} if cursor: params['cursor'] = cursor response = client.app.bsky.graph.get_followers(params) followers.extend(response.followers) cursor = response.cursor if not cursor: break print(f"عدد المتابعين: {len(followers)}") for follower in followers: handle = follower.handle did = follower.did try: client.app.bsky.graph.follow.create( repo=USERNAME, record={ "subject": did, "createdAt": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()) } ) print(f"تمت متابعة: {handle}") time.sleep(DELAY_SECONDS) except Exception as e: print(f"خطأ أثناء متابعة {handle}: {e}") print("اكتملت العملية.") if __name__ == "__main__": main()
yourname.bsky.social
) لا تضع بريدك الإلكتروني هنا!jack.bsky.social
)python bluesky_auto_follow.py
handle must be a valid handle
تأكد أن اسم الحساب مكتوب بشكل صحيح وبدون مسافات.DELAY_SECONDS
), لا تقلله كثيراً حتى لا تتعرض للحظر المؤقت.client.app.bsky.graph.follow.create(...)
كما في السكربت.
TARGET_HANDLE
في كل مرة.