Ban @themarkymark!

in testing123 •  5 years ago  (edited)

SWEET TEST COMPLETE - IT worked! Here's code for my references! This is fun, building!

Flag @themarkymark! He is also @buildawhale meaning he is the biggest spammer and abuser on steemit.com!. (-‿◦☀)!xviewxview
https://steemit.com/busy/@themarkymark/i-am-sorry-i-have-a-confession-to-make
#flag-mark #hi #steemit!
Here's a screenshot of the the file that adds random static images that I have already uploaded steemit. This is just for my backup and is a rough draft. Just getting the basic functions together. Organization is key, itwouldbegoodto separate these lists, and even make a webpage for filling enthuse things! lol Eventually it'll bey own steemit poster. Yay! Is that a Spoonerism? lol if not I need learn to swap two words between two stapables still! lol

Screen Shot 2019-11-17 at 6.51.57 PM.png

#!/usr/local/bin/python3
from beem.imageuploader import ImageUploader
from beem import Steem
import random, os
import schedule
import time

def job():
if name == "main":
stm = Steem()
author = "coininstant"
path = "/Users/nick/steemit-images-coininstant-4blog-marky"
random_filename = random.choice([
x for x in os.listdir(path)
if os.path.isfile(os.path.join(path, x))
])
random_filename3 = random.choice([
x for x in os.listdir(path)
if os.path.isfile(os.path.join(path, x))
])
image_path = random_filename
image_uploader = ImageUploader(steem_instance=stm)
image_path3 = random_filename3
img_link = image_uploader.upload(image_path, author, image_name="@coininstant:)")
img_link2 = image_uploader.upload(image_path, author, image_name="@coininstant)")
img_link3 = image_uploader.upload(image_path3, author, image_name="@coininstant3:)")
img_link4 = image_uploader.upload(image_path3, author, image_name="@coininstant4)")
body_text = "
https://steemit.com/busy/@themarkymark/i-am-sorry-i-have-a-confession-to-make
#flag-mark #hi #steemit!"
break_space = "\n"
r_footer_image_list = ["", "", "", "", ""]
follow_footer = "Follow @coininstant for more!"

    title = "Ban @themarkymark!"

    body = "Flag @themarkymark! He is also @buildawhale meaning he is the biggest spammer and abuser on steemit.com!. "\
           "(-‿◦☀)!![x]("\
           "%s" % img_link["url"]+"%s" % "[view]"+ "("+ img_link2["url"]+"![x]("+ img_link3["url"]+"%s" % "[view]"+ "("+ img_link4["url"]+ body_text + break_space + "# "+ (random.choice(r_footer_image_list)) + follow_footer
    parse_body = True
    self_vote = False
    tags = ["testing123"]
    stm.post(title, body, author=author, tags=tags, parse_body=parse_body, self_vote=self_vote)

schedule.every(7).minutes.do(job)
while True:
schedule.run_pending()
time.sleep(1)

Follow @coininstant for more!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

So this script selects a random image that I've already uploaded and posted as a new post on my page?

Posted using Partiko Android