Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
import json import time from selenium import webdriver from selenium.webdriver.common.by import By # Path to your exported cookies.json COOKIES_FILE = "cookies_for_selenium.json" # URL = "https://polybuzz.ai" URL = "https://www.polybuzz.ai/character/chat/free-use-farm-KwmD2?chatScene=1" # Start Firefox options = webdriver.FirefoxOptions() options.add_argument("--start-maximized") driver = webdriver.Firefox(options=options) # Step 1: Load the page once so the domain is set driver.get(URL) # Step 2: Load cookies from file with open(COOKIES_FILE, "r", encoding="utf-8") as f: cookies = json.load(f) for cookie in cookies: if "sameSite" in cookie: cookie.pop("sameSite") if "expiry" in cookie: cookie["expiry"] = int(cookie["expiry"]) try: driver.add_cookie(cookie) except Exception as e: print("Skipping cookie:", cookie.get("name"), e) # Step 3: Refresh to apply cookies driver.refresh() print("Cookies applied, you should be logged in.") # Example loop: click button + scrape new messages seen = set() def extract_new_messages(): ps = driver.find_elements(By.CSS_SELECTOR, ".msg-list .messagebox p") new_msgs = [] for p in ps: text = p.text.strip() if text and text not in seen: seen.add(text) new_msgs.append(text) return new_msgs try: while True: # Click "Go on" button if present try: btn = driver.find_element(By.CSS_SELECTOR, ".go-on-botton") btn.click() print("Clicked Go on button") except: pass # Extract new messages msgs = extract_new_messages() if msgs: with open("messages.txt", "a", encoding="utf-8") as f: for m in msgs: f.write(m + "\n") print("Saved:", msgs) time.sleep(30) except KeyboardInterrupt: driver.quit()
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)