Bitcoin Forum
September 19, 2025, 12:07:48 PM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: forumun efsanesi, üstad trendcoin  (Read 156 times)
trendkoyn (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 5


View Profile
April 11, 2025, 11:15:33 PM
Merited by Lachrymose (5)
 #1

ingilizce öğrendi, kumara başladı, parayı buldu ve bizi unuttu...
sandınız ama yanıldınız..

kral sizi hiçbi zaman unutmadı...
içten içe siz de bu adamı çok seviyorsunuz biliyorum...

KRAL'ın anısını yaşatmak için tüm postlarını taratıp analiz yaptık..
artık türkçe bölümde, 7/24 yayında...

save_cookies.py
Code:
from selenium import webdriver
import json

driver = webdriver.Chrome()
driver.get("https://bitcointalk.org/index.php?action=login")
input("🔐 Giriş yap ve ENTER'a bas...")
cookies = driver.get_cookies()
with open("bitcointalk_cookies.json", "w") as f:
    json.dump(cookies, f)
print("✅ Çerezler kaydedildi.")
driver.quit()

bitcointalk_autobot_ui.py
Code:
import re
import random
import json
import time
import openai
import requests
from openai import OpenAI
from bs4 import BeautifulSoup
from datetime import datetime, timedelta
import gradio as gr
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import os
import difflib

# === AYARLAR ===
client = OpenAI(api_key="sansür baby")
COOKIE_FILE = "bitcointalk_cookies.json"
POSTED_LOG = "posted_threads.json"
COMMENTS_LOG = "comments_log.json"

TARGET_BOARDS = [
    "https://bitcointalk.org/index.php?board=133.0",
    "https://bitcointalk.org/index.php?board=157.0",
    "https://bitcointalk.org/index.php?board=158.0",
    "https://bitcointalk.org/index.php?board=190.0",
    "https://bitcointalk.org/index.php?board=189.0"
]

# === YARDIMCI FONKSİYONLAR ===
def is_recent(date_str):
    try:
        post_date = datetime.strptime(date_str, '%B %d, %Y, %I:%M:%S %p')
        return datetime.now() - post_date <= timedelta(days=90)
    except:
        return False

def fetch_recent_threads():
    threads = []
    for board_url in TARGET_BOARDS:
        time.sleep(3)
        try:
            response = requests.get(board_url, timeout=10)
            if response.status_code == 503:
                print(f"⚠️ 503 hatası alındı: {board_url}")
                continue
            soup = BeautifulSoup(response.content, "html.parser")
            for link in soup.find_all("a", href=True):
                href = link['href']
                if ("topic=" in href and
                    ".msg" not in href and
                    ";all" not in href and
                    "#new" not in href and
                    ".0" in href):  # sadece ana sayfa linkleri
                    full_link = href if href.startswith("http") else "https://bitcointalk.org/" + href
                    threads.append(full_link)
        except Exception as e:
            print(f"❌ Board erişim hatası: {e}")
    return list(set(threads))


def get_thread_content(url):
    try:
        time.sleep(2)
        response = requests.get(url, timeout=10)
        if response.status_code == 503:
            print(f"⚠️ 503 - konu sayfası atlandı: {url}")
            return None, None, None

        soup = BeautifulSoup(response.content, "html.parser")
        title_tag = soup.find("title")
        title = title_tag.text.strip() if title_tag else "Başlık yok"

        # İçeriği div.post içerisinden çek
        post_blocks = soup.select("div.post")
        content = None
        for block in post_blocks:
            text = block.get_text(strip=True)
            if len(text) > 50:  # en az 50 karakter olan ilk mesajı al
                content = text
                break

        if not content:
            print(f"⚠️ İçerik bulunamadı: {url}")
            return None, None, None

        # Tarihi yakala ve 90 gün içinde mi kontrol et
        date_tags = soup.select("div.smalltext")
        recent_found = False

        for tag in date_tags:
            try:
                date_str = tag.text.strip()
                post_date = datetime.strptime(date_str, '%B %d, %Y, %I:%M:%S %p')
                if datetime.now() - post_date <= timedelta(days=90):
                    recent_found = True
                    break
            except:
                continue

        if not recent_found:
            print(f"⏳ Eski başlık atlandı: {url}")
            return None, None, None

        return title, content, url  # ← BU SATIR EKSİKTİ, EKLEDİK ✅

    except Exception as e:
        print(f"❌ İçerik çekme hatası: {e}")
        return None, None, None




def load_style_profile(username="trendcoin"):
    filename = f"{username}_style_profile.json"
    if not os.path.exists(filename):
        raise FileNotFoundError(f"{filename} bulunamadı.")
    with open(filename, "r", encoding="utf-8") as f:
        data = json.load(f)
    return data["style_profile"]

def remove_emojis(text):
    emoji_pattern = re.compile("["
        u"\U0001F600-\U0001F64F"  # yüz ifadeleri
        u"\U0001F300-\U0001F5FF"  # semboller ve objeler
        u"\U0001F680-\U0001F6FF"  # ulaşım ve harita
        u"\U0001F1E0-\U0001F1FF"  # bayraklar
        "]+", flags=re.UNICODE)
    return emoji_pattern.sub(r'', text)

def generate_comment_with_style(title, content, style_profile):
    prompt = f"""
Sen Bitcointalk Türkçe forumunun aktif bir üyesisin. Yazım stilin aşağıdaki gibidir:

- Ton: {style_profile["tone"]}
- Yazı dili: {style_profile["formality"]}
- Noktalama kullanımı: {style_profile["punctuation"]}
- Ortalama cümle uzunluğu: {style_profile["average_sentence_length"]}
- Duygu: {style_profile["tone"]}
- Yapı: {style_profile["structure"]}
- Emoji kullanımı: {style_profile["emoji_usage"]}

Aşağıdaki başlığa bu stil ile bir yorum yap:

Başlık: {title}
İçerik: {content[:1000]}

Yorumun:
"""

    response = client.chat.completions.create(
        model="gpt-4",
        messages=[{"role": "user", "content": prompt}],
        temperature=0.7,
        max_tokens=300
    )

    comment = response.choices[0].message.content.strip()
    comment = remove_emojis(comment)
    print(f"✍️ GPT cevabı (emoji temizlenmiş):\n{comment}\n")
    return comment



def load_cookies(driver, cookie_file):
    driver.get("https://bitcointalk.org")
    with open(cookie_file, "r") as f:
        cookies = json.load(f)
        for cookie in cookies:
            driver.add_cookie(cookie)
    driver.refresh()
    time.sleep(3)

def load_posted_log():
    if os.path.exists(POSTED_LOG):
        with open(POSTED_LOG, "r") as f:
            return set(json.load(f))
    return set()

def save_to_log(url):
    posted = load_posted_log()
    posted.add(url)
    with open(POSTED_LOG, "w") as f:
        json.dump(list(posted), f)

def load_comments_log():
    if os.path.exists(COMMENTS_LOG):
        with open(COMMENTS_LOG, "r") as f:
            return json.load(f)
    return []

def save_comment_log(url, comment):
    comments = load_comments_log()
    comments.append({"url": url, "comment": comment, "timestamp": datetime.now().isoformat()})
    with open(COMMENTS_LOG, "w") as f:
        json.dump(comments, f)

def is_similar_to_previous(comment):
    previous_comments = load_comments_log()
    for entry in previous_comments:
        existing = entry['comment']
        ratio = difflib.SequenceMatcher(None, existing, comment).ratio()
        word_overlap = len(set(existing.split()) & set(comment.split())) / max(len(set(comment.split())), 1)
        if ratio > 0.80 or word_overlap > 0.6:
            print("🚫 Spam benzeri içerik tespit edildi.")
            return True
    return False

def post_comment(driver, url, comment):
    print("🚀 Post atılıyor:", url)
    try:
        driver.get(url)
        time.sleep(3)

        try:
            reply_button = driver.find_element(By.LINK_TEXT, "Reply")
        except:
            reply_button = driver.find_element(By.XPATH, "//a[contains(@href,'action=post')]")
        reply_button.click()
        time.sleep(3)

        textarea = driver.find_element(By.NAME, "message")
        textarea.clear()
        textarea.send_keys(comment)
        time.sleep(1)

        post_btn = driver.find_element(By.XPATH, "//input[@value='Post']")
        post_btn.click()
        print("✅ Post başarıyla atıldı.")

    except Exception as e:
        print("❌ Post hatası:", e)



def run_bot(driver):
    posted_log = load_posted_log()
    thread_links = fetch_recent_threads()
    print("🔍 Taranan başlık sayısı:", len(thread_links))

    try:
        style_profile = load_style_profile("trendcoin")
    except Exception as e:
        return f"❌ Stil profili yüklenemedi: {e}"

    for link in thread_links:
        print(f"🔗 İşleniyor: {link}")
        if link in posted_log:
            print("⏩ Daha önce post atılmış, atlanıyor.")
            continue

        title, content, url = get_thread_content(link)
        if not title or not content:
            print("⚠️ Başlık veya içerik eksik, atlandı.")
            continue

        print(f"📌 Başlık: {title}\n📝 İçerik (ilk 200 karakter): {content[:200]}\n")

        try:
            comment = generate_comment_with_style(title, content, style_profile)
        except Exception as e:
            print(f"❌ Yorum oluşturulamadı: {e}")
            continue

        if is_similar_to_previous(comment):
            print("🚫 Spam koruması nedeniyle post atılmadı.\n")
            continue

        try:
            post_comment(driver, url, comment)
            save_to_log(url)
            save_comment_log(url, comment)
            return f"✅ Gönderildi: {title}\n\n🧠 Yorum: {comment}"
        except Exception as e:
            print(f"❌ Gönderim hatası: {e}\n")

    return "⚠️ Uygun veya benzersiz yorum atılabilecek başlık bulunamadı."



def get_admin_log():
    comments = load_comments_log()
    return "\n\n".join([f"🧵 {c['url']}\n🗓️ {c['timestamp']}\n📝 {c['comment']}" for c in comments[-10:]]) or "Henüz gönderi yok."

with gr.Blocks() as demo:
    gr.Markdown("""# 🤖 Bitcointalk Türkçe Bot\nGPT-4 ile 21 gün içindeki başlıklara doğal, insan gibi yorumlar gönderir.""")
    with gr.Row():
        run_btn = gr.Button("📝 Yorum Gönder (Manuel)")
        view_log = gr.Button("📜 Gönderilenleri Gör")
    output = gr.Textbox(label="Sonuç")
    history = gr.Textbox(label="Gönderilenler", lines=20)

    run_btn.click(fn=run_bot, outputs=output)
    view_log.click(fn=get_admin_log, outputs=history)

if __name__ == "__main__":
    # GUI'yi ayrı başlat
    import threading

    def launch_ui():
        demo.launch()

    threading.Thread(target=launch_ui).start()

    # Bot işlemi
    driver = webdriver.Chrome()
    load_cookies(driver, COOKIE_FILE)

    while True:
        try:
            print("🚀 Bot çalışıyor...")
            result = run_bot(driver)
            print(result)
        except Exception as e:
            print(f"🔥 Genel hata: {e}")

        wait_time = random.randint(1800, 7200)  # 30 dk – 2 saat arası
        print(f"⏳ Sonraki deneme {round(wait_time / 60)} dakika sonra...")
        time.sleep(wait_time)

trendcoin_style_profile.json
Code:
{
  "username": "trendcoin",
  "style_profile": {
    "persona": "yıllardır forum takip eden, çok şey görmüş ama artık hiçbir şeye şaşırmayan biri. yazarken dilbilgisi umrunda değil, yeter ki lafı gitsin. bazen alaycı, bazen dalga geçer gibi ama kafasına göre takılır.",
    "tone": "umursamaz, alaycı, iğneleyici",
    "formality": "hiç yok – büyük harf, noktalama, paragraf yapısı arama",
    "average_sentence_length": "kısa (3–8 kelime)",
    "punctuation": "dağınık – ya hiç nokta koymaz ya da üç tane koyar... bazen noktalama hiç yok",
    "vocabulary_level": "gündelik – cool görünmeye çalışan ama rahat bir dil",
    "emoji_usage": "kullanmaz",
    "structure": "tek paragraflık yazılar, bazen tüm metin tek cümle gibi akar gider",
    "rhetorical_style": "alaycı sorular, bazen laf sokar gibi, bazen hiç açıklama yapmaz",
    "engagement_style": "tek taraflı konuşur gibi, ama arada okuru dürter",
    "typical_topics": [
      "pump dump yorumları",
      "token dolandırıcılıkları",
      "topluluk boş yapıyor mu",
      "eski projeler neden battı",
      "trader'lara laf çakmalar"
    ],
    "humor_level": "yüksek – pasif agresif, laf sokmalı",
    "preferred_format": "büyük harf yok, noktalama zayıf, cümleler kısık sesle söylenmiş gibi",
    "discourse_example": [
      "yine bir token daha... geçmiş olsun",
      "adamlar dump'a doymamış... kimse de bi şey demiyo",
      "valla yazık ya... herkes rekt olacak belli"
    ]
  }
}
Lachrymose
Legendary
*
Offline Offline

Activity: 1820
Merit: 1260



View Profile
April 12, 2025, 12:16:28 AM
 #2

yeni versiyona sırasıyla;
- coingecko api (anlik piyasa bilgisi)
- alquran cloud api (dini bilgi)
- twitter api (siyasi bilgi)

eklenmeli.

nerdesin ustad?
cok ozledik…
yenerbatmaz
Sr. Member
****
Offline Offline

Activity: 1288
Merit: 318


Spinly.io - Next-gen Crypto iGaming Platform


View Profile
April 12, 2025, 05:33:27 AM
 #3

Bro her nerede isen geri gel. Sen olmadan post atacak konu bulamıyoruz. Sen ne güzel muhalefet ediyordun.
Herkes aynı düşüncede . AKP'li birisi lazım. Karşıt görüş olsun.

Şaka şaka aman ha. Gözünü seveyim. At gözlüğü takan birisi ile tartışmak sinir bozucu.
Kaliteli tartışma evet ama körü körüne inanmış birisi ile ne tartışmaya girilir ne de sohbete.


░▄████████████▀▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▄██
████████████░█▀
████░▄▄▄███████
████▄▄▄▄▄▄▄▄░▄██
▀▀▀▀▀▀▀▀████░███
████████████░███
████████████░█▀

░▄████████████▀▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▄██
████████████░███
████████████░███
████████████░███
████▄▄▄▄████░██▀
████▀▀▀▀▀▀▀▀░▀
████░█▀

░▄████████████▀▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▄██
████████████░█▀
█████████░▄▄▄
█████████░███
░▄░██████░██▀██
▀▀░██████░▀██▄██
████████████░█▀

░▄███████▀░▄██▀▄
▀▀▀▀▀▀▀▀██▀▀▀▄██
████████████░███
████████████░███
██░▄░███████░███
██░█░███████░███
████████████░███
████████████░█▀

░▄██████▀▄
▀▀▀▀▀▀▀▄██
██████░███
██████░███
██████░███
██████░███████▀▄
██████░▀▀▀▀▀▀▄██
████████████░█▀

░▄████▀██▄█████▀▄
▀▀▀▀▀███▀▀▀▀▀▀▄██
█████████████░███
█████░█░█████░███
█████░▀░█████░███
█████████████░█▀
██████████░▄▄▄
██████████░█▀
| 
 Next−Gen Crypto iGaming 
|||
▄▄▄▄
█▀▀






█▄▄
▀▀▀▀
 
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Play now
 
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄▄▄▄
▀▀█






▄▄█
▀▀▀▀
trendkoyn (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 5


View Profile
April 12, 2025, 10:49:20 AM
 #4

kral güncelleme aldı (v1.0.1)

- gelişmiş stil analizi (trendcoin_laf_meter): dini ima, laf sokma, iç ses, bitiriş, üçleme, sertlik kontrolü.
- stil düzeltici (refine_trendcoin_style): yorumlar daha kısa, içsel, imalı.
- yarı-ciddi, biraz pasif-agresif ton. hahaha diye gülmüyor, emoji kullanmıyor, hafif dini ve siyasi kimlik eklendi.
- spam tekrarı önleme: kelimeler ve yorumlar %60ın üzerinde benzerlik gösterirse atmıyor.
- spam önleme: günde ~4 post atacak ve karakter oturunca günde 1-2'ye düşürülecek.

asla yalnız kalmayacaksın ustad, seni seviyoruz

takitler aslını yaşatır...
totti67
Sr. Member
****
Offline Offline

Activity: 1078
Merit: 323


View Profile
April 14, 2025, 09:43:41 AM
 #5

Ben sırf bana bulaşan biri yok diye forumdan soğuduydum, nerelerdeysen mutlaka geri gel iki gözümün çüçeğiiiiiii, kompakt bir huzursuzluk verici adam bulmak bu devirde çok kolay aslında ama senin gibisini bulmak çok zor yiğidim aslanım Smiley
yenerbatmaz
Sr. Member
****
Offline Offline

Activity: 1288
Merit: 318


Spinly.io - Next-gen Crypto iGaming Platform


View Profile
April 14, 2025, 10:32:14 AM
 #6

Ben sırf bana bulaşan biri yok diye forumdan soğuduydum, nerelerdeysen mutlaka geri gel iki gözümün çüçeğiiiiiii, kompakt bir huzursuzluk verici adam bulmak bu devirde çok kolay aslında ama senin gibisini bulmak çok zor yiğidim aslanım Smiley

Forumda ama bizim lokale uğramıyor. Global de postları var. Dragon imzasında takılıyor. Aslında bizim imzaya girse d tierden devam eder. Legendary olanlar için üst tiere çıkmak zor değil. 60 post atsa ki atar çok rahat. Bir iki tartışma konusu açsa bir günde bile atar ama gelmez artık.
Baktı gördü seni beni düzeltemedi ne haliniz varsa görün dedi

Edit: bizim imza duraklama dönemine girmiş yine.  ;-))


░▄████████████▀▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▄██
████████████░█▀
████░▄▄▄███████
████▄▄▄▄▄▄▄▄░▄██
▀▀▀▀▀▀▀▀████░███
████████████░███
████████████░█▀

░▄████████████▀▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▄██
████████████░███
████████████░███
████████████░███
████▄▄▄▄████░██▀
████▀▀▀▀▀▀▀▀░▀
████░█▀

░▄████████████▀▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▄██
████████████░█▀
█████████░▄▄▄
█████████░███
░▄░██████░██▀██
▀▀░██████░▀██▄██
████████████░█▀

░▄███████▀░▄██▀▄
▀▀▀▀▀▀▀▀██▀▀▀▄██
████████████░███
████████████░███
██░▄░███████░███
██░█░███████░███
████████████░███
████████████░█▀

░▄██████▀▄
▀▀▀▀▀▀▀▄██
██████░███
██████░███
██████░███
██████░███████▀▄
██████░▀▀▀▀▀▀▄██
████████████░█▀

░▄████▀██▄█████▀▄
▀▀▀▀▀███▀▀▀▀▀▀▄██
█████████████░███
█████░█░█████░███
█████░▀░█████░███
█████████████░█▀
██████████░▄▄▄
██████████░█▀
| 
 Next−Gen Crypto iGaming 
|||
▄▄▄▄
█▀▀






█▄▄
▀▀▀▀
 
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Play now
 
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄▄▄▄
▀▀█






▄▄█
▀▀▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!