Search content
Sort by

Showing 20 of 893 results by SwayStar123
Post
Topic
Board Meta
Merits 26 from 7 users
Topic OP
Python script to automatically delete or edit all bitcointalk posts
by
SwayStar123
on 07/10/2023, 13:22:18 UTC
⭐ Merited by hugeblack (6) ,ETFbitcoin (5) ,LoyceV (4) ,DdmrDdmr (4) ,dkbit98 (3) ,hd49728 (2) ,Initscri (2)
Since you cant delete your account here, and deleting posts manually one by one is a pain, i made a python script to automatically delete all posts that can be deleted, and to edit those which can only be edited (changes subject and message to "x")

I couldnt find any terms of service for this website, so not sure if this is even allowed.


Requirements
Python
Chrome (you can edit the script yourself to change browser if you want)
Selenium installed in python
Code:
pip install selenium

How to use
After installing selenium, simply run the python script, it will ask you how many pages of posts your account has (Profile -> Show Posts -> Highest page number available)
just enter the number you see in your profile and then hit enter. It will then open up a chrome browser with the login page for bitcointalk open, you will have 60 seconds to log in and when the 60 seconds are up, the script will start deleting and editing posts from your profile.
Note: When logging in, you should set number of minutes to be logged in to a higher number if you have many posts

WARNING
This should be obvious, but running this script will try to delete as many of your posts as it can, so dont run it if you dont want that..

Code: https://github.com/SwayStar123/del_btctalk_posts

Code:
import re
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException

def extract_ids_from_url(post_url):
    # Splitting the URL based on "?"
    parameters = post_url.split('?')[1]
   
    # Extracting topic and msg IDs from the parameters
    topic_id = parameters.split('.msg')[0].split('topic=')[1]
    msg_id = parameters.split('.msg')[1].split('#')[0]
   
    return topic_id, msg_id

def delete_post(browser, post_url, sesc_token):
    topic_id, msg_id = extract_ids_from_url(post_url)
   
    # Constructing the delete URL
    delete_url = f"https://bitcointalk.org/index.php?action=deletemsg;topic={topic_id}.0;msg={msg_id};sesc={sesc_token}"

    browser.get(delete_url)

    time.sleep(1)

    if browser.current_url == f"https://bitcointalk.org/index.php?topic={topic_id}.0":
        return True
    else:
        return False

def edit_post(browser, post_url, sesc_token):
    topic_id, msg_id = extract_ids_from_url(post_url)
       
    # Navigate to edit URL
    edit_url = f"https://bitcointalk.org/index.php?action=post;msg={msg_id};topic={topic_id}.0;sesc={sesc_token}"
    browser.get(edit_url)
   
    try:
        # Change the subject to "x"
        subject_elem = WebDriverWait(browser, 2).until(
            EC.presence_of_element_located((By.NAME, 'subject'))
        )
        subject_elem.clear()
        subject_elem.send_keys('x')
       
        # Change the message content to "x"
        message_elem = WebDriverWait(browser, 2).until(
            EC.presence_of_element_located((By.NAME, 'message'))
        )
        message_elem.clear()
        message_elem.send_keys('x')
       
        # Click the Save button
        save_button = WebDriverWait(browser, 2).until(
            EC.presence_of_element_located((By.NAME, 'post'))
        )
        save_button.click()
       
    except Exception as e:
        print(f"Error editing post: {e}")
   
    time.sleep(0.5)  # Introduce a delay before processing the next post or action


def scrape_post_urls(browser, start):
    browser.get(BASE_URL + str(start))
    post_urls = []
    try:
        # Target <a> elements within <td> of class 'middletext' and get the third (last) link
        post_elements = WebDriverWait(browser, 10).until(
            EC.presence_of_all_elements_located((By.XPATH, '//td[@class="middletext"]/a[3]'))
        )
        for post_element in post_elements:
            post_urls.append(post_element.get_attribute("href"))
    except Exception as e:
        print(f"Error scraping post URLs at start={start}: {e}")
    return post_urls

def extract_sesc_token(browser):
    # Go to the homepage or any page where the logout link is visible
    browser.get("https://bitcointalk.org/index.php")
    try:
        # Locate the logout link and extract the sesc token from its href attribute
        logout_link = WebDriverWait(browser, 10).until(
            EC.presence_of_element_located((By.XPATH, '//a[contains(@href, "action=logout")]'))
        )
        href = logout_link.get_attribute('href')
        sesc_token = href.split('sesc=')[1]
        return sesc_token
    except Exception as e:
        print(f"Error extracting sesc token: {e}")
        return None

def extract_user_id(browser):
    # Navigate to main profile page
    browser.get('https://bitcointalk.org/index.php?action=profile')
   
    try:
        # Extracting the URL of the 'Account Related Settings' link
        account_related_settings_url = WebDriverWait(browser, 10).until(
            EC.presence_of_element_located((By.XPATH, '//a[contains(text(), "Account Related Settings")]'))
        ).get_attribute('href')
       
        # Extracting the user ID from the URL
        user_id = re.search(r'u=(\d+)', account_related_settings_url).group(1)
        return user_id
   
    except (TimeoutException, AttributeError):
        print("Failed to extract user ID.")
        return None
   
if __name__ == '__main__':
    num_pages = int(input("How many pages of posts do you have in your profile?: "))

    browser = webdriver.Chrome()

    # Navigate to login page or homepage
    browser.get("https://bitcointalk.org/index.php?action=login")
    print("Please login manually within the next 60 seconds...")
    time.sleep(60)  # Give 60 seconds for manual login

    # Extract user ID
    user_id = extract_user_id(browser)

    if not user_id:
        print("Failed to extract user ID.")
        browser.quit()
        exit()

    BASE_URL = f'https://bitcointalk.org/index.php?action=profile;u={user_id};sa=showPosts;start='

    sesc_token = extract_sesc_token(browser)
    if sesc_token:
        print(f"Extracted sesc token: {sesc_token}")

        # Continue with rest of your logic, e.g., scraping post URLs and deleting posts
        all_post_urls = []
        for start in range(0, num_pages*20, 20):
            all_post_urls.extend(scrape_post_urls(browser, start))

        for post_url in all_post_urls:
            res = delete_post(browser, post_url, sesc_token)
            if res == True:
                continue
            else:
                edit_post(browser, post_url, sesc_token)
    else:
        print("Failed to extract sesc token.")
   
    browser.quit()
Post
Topic
Board Project Development
Re: Looking for someone with solid strategy to teamup with and automate for Binance
by
SwayStar123
on 07/07/2021, 05:27:49 UTC
Before asking for a trading strategy, at least you first describe what the advantages of the trading bot are. it should be attached so that it is not only an offer, but you can convince many people.
as for if it is still in the development stage, then it is better to refine the bot until it is ready to be applied on a large scale. If not, I think it's still too early.

anyone whos good at trading will already know this
Post
Topic
Board Bitcoin Discussion
Re: what is GandalfDex????
by
SwayStar123
on 07/07/2021, 05:25:50 UTC
ur name is literally gandalfdex how dumb do you think we are
Post
Topic
Board Bitcoin Discussion
Re: Petition to remove Craig Wright's name from Bitcoin Whitepaper's copyright
by
SwayStar123
on 29/06/2021, 11:36:37 UTC
this never really did much but looks like it may be relevant again
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin history, a fact for each day!
by
SwayStar123
on 14/06/2021, 11:13:13 UTC
I had forgotten about this for a while, since its been a couple of years you guys got anything new to add ?
Post
Topic
Board Serious discussion
Re: Bitcoin history, a fact for each day!
by
SwayStar123
on 14/06/2021, 11:12:21 UTC
I had forgotten about this for a while, since its been a couple of years you guys got anything new to add?
Post
Topic
Board Speculation (Altcoins)
Re: Sovryn price speculation. (Bitcoin dex)
by
SwayStar123
on 26/05/2021, 18:06:57 UTC
There are so many huge investors backing this project, such as bitmex and pomp, i think it is a amazing hold long term
Post
Topic
Board Service Discussion (Altcoins)
Topic OP
Sovryn Liquidity Mining event|40k SOV/1.2mil USD in rewards!
by
SwayStar123
on 24/05/2021, 17:56:38 UTC

https://www.sovryn.app/blog/prepare-yourself-for-the-awakening

Provide SOV/BTC liquidity in the AMM and receive a part of the 1.2mil as an additional reward aswell as regular LP fees!
Post
Topic
Board Speculation (Altcoins)
Re: Sovryn price speculation. (Bitcoin dex)
by
SwayStar123
on 22/05/2021, 06:45:07 UTC
In my opinion, i think Sovryn (SOV) can hit around $2k for sure.
Because this coin is doing really well in ICO and Sovryn can become one of hiddent gems in the cryptospace.
I think that SOV can really become huge in the future and can compete with top altcoins.
They probably can once their service become booming, the problem with it though the RSK chain that's not really popular (in my opinion) and they need some kind of external support like blockchain bridging, etc.
Even now there's very little people knowing about this project, it only takes enough people knowing that defi for bitcoin exists to go as far as $2K because that's the deserving price.


the platform is not allowing us to send other tokens. you'd have to stay on rsk network for good. if you are an investor you'd have to deposit BTC inorder to trade it with rBTC, rUSDT and so on. it's entirely a secluded market that you can't get in and get out easily. limited access which you only buy rBTC on Kucoin, Bitfinex and SOV platform. its kind of new, i have to get out sold mine at $60. wish to see changes later.



I think this is what your looking for https://tokenbridge.rsk.co/
Post
Topic
Board Speculation (Altcoins)
Re: Sovryn price speculation. (Bitcoin dex)
by
SwayStar123
on 21/05/2021, 09:22:35 UTC
So, SOV has been in this channel for a while now, what do you guys think it does?

This day technical analysis will not work again when it comes to the bad news that faced major crypto. Sovryn goes down so hard caused by the bitcoin dump and this is also affecting the people who are still holding their RBTC.
So many people have been missing the opportunities to buy that at the peak price dude.
We are getting another chance again that to buy that even deeper than before.

Yeah your right, Bitcoin crashed and all altcoins followed down with it, Sovryn was no exception, but fundamentals are strong so im hopeful for long term
Post
Topic
Board Auctions
Re: Advertise on this forum - Round 339
by
SwayStar123
on 20/05/2021, 19:42:28 UTC
5 @ 2mBTC
http://telega.io/ - Telegram Ad Exchange

I want to cancel a bid

Your bid was invalid from the beginning, all the bids were at 2 mBTC, all 9 slots were bid on and you were the latest, meaning the previous bidders get priority
Post
Topic
Board Project Development
Topic OP
Sovryn announces largest ever Gitcoin hackathon to date | 500,000 USD in prizes
by
SwayStar123
on 19/05/2021, 09:41:55 UTC
https://www.sovryn.app/blog/make-way-for-sovrython-a-500k-gitcoin-hackathon-to-ignite-the-sovryn-ecosystem

Description:
Quote
Make way for Sovrython! A $500k Gitcoin Hackathon to Ignite the Sovryn Ecosystem
Bitcoin-native DeFi is an unexplored galaxy in the blockchain universe. Take part in pioneering this new sector with us as we build the future of a borderless, digital financial operating system.

Sovryn, the leading protocol for DeFi on Bitcoin, is proud to announce Sovrython, a virtual conference and hackathon taking place from June 4th - July 18th, 2021, with $250k in bounties and $250k in post-hackathon grants for promising projects. This amounts to $500k of support for developing open-source DeFi software that integrates with the Sovryn protocol and platform. Bounties and grants will be paid out in Sovryn’s native token, $SOV.

Bitcoin is the solid foundation upon which to build the future of finance. It is transparent, incorruptible, programmable money. Innovating on Bitcoin does not mean changing Bitcoin Mainchain - it means building new layers of superpowers that extend the capabilities of Bitcoin. Sovrython is an opportunity to join other Bitcoin Mutants at the cutting edge of blockchain tech: sidechains, DeFi, Lightning Network, and Layer 2 systems.



Judges include:

Quote
Corey Petty of The BTC Podcast / status.im

Max Hillebrand Wasabi Wallet Dev

Joerg Platzer Room 77 / Paralelni Polis

Muneeb CEO, Stacks

Greg Osuri CEO, Akash Network

Boris Mann Founder, Fission Codes

Brantly Millegan BizDev, ENS Domains

Udi Wertheimer, Legend, Have Fun Staying Poor

Alexei Zamyatin, Founder, CEO, Interlay

John Light, lightco.in

Dan Held, Growth

Eric Meltzer, Proof of Work

There are details in the post linked at the start if you want to enter
Post
Topic
Board Speculation (Altcoins)
Re: Sovryn price speculation. (Bitcoin dex)
by
SwayStar123
on 17/05/2021, 14:48:23 UTC
I don't know for now, but longterm it has to reach ETH price IMO. Not financial advice.

So around 3-4k?
Post
Topic
Board Marketplace
Re: Would you lend your cryptocurrencies?
by
SwayStar123
on 17/05/2021, 14:47:05 UTC
certainly but it really only makes sense to do it decentrally

For eg- if you want to lend bitcoin you would want to do it on sovryn
if you want to lend eth, you would want to do it on compound etc
Post
Topic
Board Speculation (Altcoins)
Topic OP
Sovryn price speculation. (Bitcoin dex)
by
SwayStar123
on 14/05/2021, 07:04:47 UTC
So, SOV has been in this channel for a while now, what do you guys think it does?

Post
Topic
Board Speculation (Altcoins)
Re: Sovryn
by
SwayStar123
on 13/05/2021, 16:36:16 UTC


SOV statistics from first month of trading
Post
Topic
Board Project Development
Re: Sovryn - Brings DeFi to Bitcoin
by
SwayStar123
on 13/05/2021, 16:35:12 UTC


Statistics from first month of sov trading
Post
Topic
Board Project Development
Re: Looking for founding members for a more anonymous bitcoin.
by
SwayStar123
on 10/05/2021, 14:10:06 UTC
Forking RSK might be an option
Post
Topic
Board Speculation
Re: Wall Observer BTC/USD - Bitcoin price movement tracking & discussion
by
SwayStar123
on 08/05/2021, 17:14:11 UTC
India is getting hammered by Covid-19. Situation over there is worse than the chaos what i saw in Brazil.

Absolute madness.

*nod* I'm kind of wondering what the fuck happened, could this be the result of that stupid religious holiday a month ago? If so then man, those Gods are *pissed*

People not wearing masks, and the government allowing massive crowds to gather in the name of religion so they can get votes next election. All this combined with the fact that we're low on oxygen cylinders, and hospital beds are over capacity by a huge amount

I have not met you... so I will try not to be an asshole right out of the gate.  But I find it cognitively very challenging that you can type the bolded, and also have the words: "Be decentralized, be sovryn" in your profile.

People dying from covid is certainly a difficult and challenging problem.  But my limit for where I find it acceptable for a government to deny it's people to assemble is MUCH MUCH higher than yours seemingly.

Millennial or younger?

Religion and tradition should not be an excuse to let people die. When the politicians are saying "Death is inevitable but traditions must go on" it is very hard to agree with them. Everyone deserves freedom, but it shouldn't come at the cost of others.

Younger

Are you nuts?
You are basically giving the government a freecard to do what ever they want with the people as long as they can say that it is "to protect others".

The supreme court is a thing? This is the stupidest shit ive heard
Post
Topic
Board Speculation
Re: Wall Observer BTC/USD - Bitcoin price movement tracking & discussion
by
SwayStar123
on 08/05/2021, 16:06:07 UTC
India is getting hammered by Covid-19. Situation over there is worse than the chaos what i saw in Brazil.

Absolute madness.

*nod* I'm kind of wondering what the fuck happened, could this be the result of that stupid religious holiday a month ago? If so then man, those Gods are *pissed*

People not wearing masks, and the government allowing massive crowds to gather in the name of religion so they can get votes next election. All this combined with the fact that we're low on oxygen cylinders, and hospital beds are over capacity by a huge amount

I have not met you... so I will try not to be an asshole right out of the gate.  But I find it cognitively very challenging that you can type the bolded, and also have the words: "Be decentralized, be sovryn" in your profile.

People dying from covid is certainly a difficult and challenging problem.  But my limit for where I find it acceptable for a government to deny it's people to assemble is MUCH MUCH higher than yours seemingly.

Millennial or younger?

Religion and tradition should not be an excuse to let people die. When the politicians are saying "Death is inevitable but traditions must go on" it is very hard to agree with them. Everyone deserves freedom, but it shouldn't come at the cost of others.

Younger