• 16 Posts
  • 25 Comments
Joined 1 year ago
cake
Cake day: July 8th, 2023

help-circle


  • CaspianXI@lemmy.worldtoAsk Lemmy@lemmy.world*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    20
    arrow-down
    1
    ·
    edit-2
    1 year ago

    I write a blog on Medium.

    You need to have a ton of content to make any amount of money. After writing 200 articles, I started making a consistent $100/month. Not quitting my day job any time soon, but I have a lot of downtime at work, so it’s a productive way to pass the time.

    Oh, and the $100/month is pretty consistent. I took a month off from writing, and they still sent me money for the read time on my old articles. The pay is low… but my boss wouldn’t send me a small stipend if I decided not to show up for a month. So, I really can’t complain.



  • When you order something with 2-day delivery, it not only needs to be in stock… but it needs to be in a warehouse in your city. This requirement means there needs to be a surplus.

    They don’t know where the orders will come in, so they make enough to send them to every warehouse in the country. But if all of them got sold, the supply would drive the price down. So, they wait until a certain number gets sold (say… a few hundred) and then destroy the rest.

    It’s sickening that this is even a thing. But that’s the world we live in.

















  • The problem stems from the fact that brands want their products to be made readily accessible to anyone who wants to order with next-day delivery, which means there needs to be a surplus to satisfy customers’ cravings for instant gratification… but a surplus would drive prices down, which is why they mass-produce products, then immediately trash whatever is not sold.

    It sickens me to know this is even a thing. But what can be done to prevent it?



  • This should get you started:

    import requests
    
    # Fetch post from Reddit API
    def fetch_reddit_post():
        reddit_url = "https://www.reddit.com/r/{subreddit}/comments/{post_id}.json"
        subreddit = "python"  # Replace with the desired subreddit
        post_id = "abcdef"  # Replace with the desired post ID
    
        url = reddit_url.format(subreddit=subreddit, post_id=post_id)
        headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"}
    
        response = requests.get(url, headers=headers)
        if response.status_code == 200:
            post_data = response.json()
            return post_data
        else:
            print("Failed to fetch post from Reddit API")
            return None
    
    # Post to Lemmy API
    def post_to_lemmy(post_data):
        lemmy_url = "https://lemmy.ml/api/{version}/post"
        version = "v3"  # Replace with the desired Lemmy API version
    
        url = lemmy_url.format(version=version)
        headers = {"Content-Type": "application/json"}
    
        # Extract necessary information from the Reddit post
        title = post_data[0]["data"]["children"][0]["data"]["title"]
        content = post_data[0]["data"]["children"][0]["data"]["selftext"]
    
        # Create payload for Lemmy API
        payload = {
            "title": title,
            "body": content,
            "community_id": "abcdef",  # Replace with the desired Lemmy community ID
            "auth": "your_auth_token"  # Replace with your Lemmy API authentication token
        }
    
        response = requests.post(url, json=payload, headers=headers)
        if response.status_code == 200:
            print("Post successfully created on Lemmy")
        else:
            print("Failed to post to Lemmy API")
    
    # Fetch post from Reddit API
    post_data = fetch_reddit_post()
    
    if post_data:
        # Post to Lemmy API
        post_to_lemmy(post_data)