How I create my code
Ok I cheat ChatGPT has been used to automate marketing tasks with Python scripts such as an email scraper, a Google Sheet updater, a site speed checker, a Reddit meme checker, and a Facebook random poster. These scripts use libraries such as requests, os, time, schedule, and Reddit API to perform tasks such as scraping emails, updating Google Sheets, measuring website load time, saving hot memes, and posting random images on Facebook. These scripts help streamline marketing tasks and save time for marketers.
Chat GPT is going to play a revolutionary part in our technological future. Much like the calculator, it’s important that we change the way we work, to stay competititve
How I create my code
Ok I cheat ChatGPT has been used to automate marketing tasks with Python scripts such as an email scraper, a Google Sheet updater, a site speed checker, a Reddit meme checker, and a Facebook random poster. These scripts use libraries such as requests, os, time, schedule, and Reddit API to perform tasks such as scraping emails, updating Google Sheets, measuring website load time, saving hot memes, and posting random images on Facebook. These scripts help streamline marketing tasks and save time for marketers.
Chat GPT is going to play a revolutionary part in our technological future. Much like the calculator, it’s important that we change the way we work, to stay competititve
Email scraper
Here is an email scraper that I have written the code for in Python, this works by supplying the script with url’s and letting the python script scrape emails.
Google Sheet updater
This code helps keep track of when a file was last changed on the computer. It sends the information to a Google Sheet so you can see when it was last changed and how many days have passed. It does this every hour so the information is always up to date.
Functions:
– Authenticate the API key using ServiceAccountCredentials
– Open the Google Sheet using “”client.open_by_url””
– Get the last modified date and time using “”os.path.getmtime””
– Format the last modified date and time
– Update the Google Sheet cells with the date, time, and number of days since the file was last modified
– Continuously run the code using “”while True”” and “”time.sleep””.”
Google Sheet updater
This code helps keep track of when a file was last changed on the computer. It sends the information to a Google Sheet so you can see when it was last changed and how many days have passed. It does this every hour so the information is always up to date.
Functions:
– Authenticate the API key using ServiceAccountCredentials
– Open the Google Sheet using “”client.open_by_url””
– Get the last modified date and time using “”os.path.getmtime””
– Format the last modified date and time
– Update the Google Sheet cells with the date, time, and number of days since the file was last modified
– Continuously run the code using “”while True”” and “”time.sleep””.”
Site speed checker
Discover the Power of Speed with This Code!
Functions:
– The test uses the time and requests modules to measure how long it takes for a website to load.
– The test_load_time function takes in a URL, makes a request to that URL using requests.get(url), and calculates the load time by subtracting the start time from the end time.
– The load time is printed out in seconds.
Site speed checker
Discover the Power of Speed with This Code!
Functions:
– The test uses the time and requests modules to measure how long it takes for a website to load.
– The test_load_time function takes in a URL, makes a request to that URL using requests.get(url), and calculates the load time by subtracting the start time from the end time.
– The load time is printed out in seconds.
Reddit meme checker
With the power of the Reddit API, the code prowls the hottest memes on three different subreddits, and saves the best ones to your computer.
But that’s not all! This code is also incredibly picky, only grabbing memes that are hot off the press (from the last 1000 hours), and that have at least 10 comments. It’s like having a personal meme butler, hand-picking the cream of the crop just for you.
And if that wasn’t enough, the code even renames each meme with a title fit for royalty. It’s like the ultimate meme makeover.
Functions:
– Utilizes Reddit API to access three subreddits
– Only saves memes that were posted in the last 1000 hours and have at least 10 comments
– Downloads and saves each meme to your computer
– Renames each meme with a title free of any unwanted characters
– Takes a break for 24 hours before starting the process again.
Reddit meme checker
With the power of the Reddit API, the code prowls the hottest memes on three different subreddits, and saves the best ones to your computer.
But that’s not all! This code is also incredibly picky, only grabbing memes that are hot off the press (from the last 1000 hours), and that have at least 10 comments. It’s like having a personal meme butler, hand-picking the cream of the crop just for you.
And if that wasn’t enough, the code even renames each meme with a title fit for royalty. It’s like the ultimate meme makeover.
Functions:
– Utilizes Reddit API to access three subreddits
– Only saves memes that were posted in the last 1000 hours and have at least 10 comments
– Downloads and saves each meme to your computer
– Renames each meme with a title free of any unwanted characters
– Takes a break for 24 hours before starting the process again.
Python script: Facebook random poster
Get ready to unleash the power of automation on Facebook!
This code will post a random image to your Facebook page 3 times a day. It also moves any images that are over 3 days old to a separate folder. The script starts by posting an image immediately and then uses the schedule library to post images at 8am, 12pm, and 4pm every day.
Functions:
– post_image: Posts a random image from the image folder to Facebook and moves the image to the posted folder.
– move files: Moves any image that is over 3 days old to the out-of-date folder.
– So sit back, relax, and let the code handle all your Facebook posting needs.
Python script: Facebook random poster
Get ready to unleash the power of automation on Facebook!
This code will post a random image to your Facebook page 3 times a day. It also moves any images that are over 3 days old to a separate folder. The script starts by posting an image immediately and then uses the schedule library to post images at 8am, 12pm, and 4pm every day.
Functions:
– post_image: Posts a random image from the image folder to Facebook and moves the image to the posted folder.
– move files: Moves any image that is over 3 days old to the out-of-date folder.
– So sit back, relax, and let the code handle all your Facebook posting needs.