fix little mistakes

This commit is contained in:
horhik 2021-08-31 23:50:06 +03:00
parent 05f963c941
commit 9d9461ec70
3 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,5 @@
FROM python:3.9
RUN pip install instabot
RUN pip install instaloader
RUN pip install Mastodon.py
RUN pip install colorama

View File

@ -138,3 +138,6 @@ https://scontent-arn2-1.cdninstagram.com/v/t51.2885-15/e35/s1080x1080/151774437_
https://scontent-arn2-1.cdninstagram.com/v/t51.2885-15/e35/153366992_108902474565458_7611933400518571612_n.jpg?_nc_ht=scontent-arn2-1.cdninstagram.com&_nc_cat=102&_nc_ohc=5aGN0EAtCAcAX9PDKb7&edm=APU89FABAAAA&ccb=7-4&oh=cceff1257344eb44d1750a66441c7820&oe=61360FF2&_nc_sid=86f79a
https://scontent-arn2-1.cdninstagram.com/v/t51.2885-15/e35/152639104_124935186140118_2270254986427930973_n.jpg?_nc_ht=scontent-arn2-1.cdninstagram.com&_nc_cat=106&_nc_ohc=2lG-CyjOjXQAX98c8LL&edm=APU89FABAAAA&ccb=7-4&oh=09c66ee68081edd4b139ed87be42b0bb&oe=6130AFF7&_nc_sid=86f79a
https://scontent-arn2-1.cdninstagram.com/v/t51.2885-15/e35/s1080x1080/151776689_264356241916450_5773227679435400693_n.jpg?_nc_ht=scontent-arn2-1.cdninstagram.com&_nc_cat=110&_nc_ohc=Qg_jJvW9CZIAX9pe-5U&edm=APU89FABAAAA&ccb=7-4&oh=014d77a9ad74361ba040a8af049c68f0&oe=6135C9B3&_nc_sid=86f79a

View File

@ -79,7 +79,7 @@ def toot(url, title ):
print(Style.RESET_ALL)
id = upload_image_to_mastodon(url)
post_text = str(title) + "\n" + "crosposted from instagram.com/innubis" # creating post text
post_text = str(title) + "\n" + "crosposted from https://instagram.com/"+fetched_user # creating post text
print(id)
mastodon.status_post(post_text, media_ids = [id])
@ -114,14 +114,14 @@ def generate_title(post):
# 'edge_media_to_caption': {'edges': [{'node': {'text': 'Good morning!\n#komikaki #всемкартинки'}}]}
posts = profile.get_posts()
stupidcounter = 0
def get_new_posts():
stupidcounter = 0
for post in posts:
if stupidcounter < 100:
if already_posted(str(post.url)):
print(Fore.YELLOW + "🐘 > Already Posted", stupidcounter, " of ", posts.count)
print(Style.RESET_ALL)
stupidcounter += 1
continue
stupidcounter += 1
toot(post.url, post.caption)
@ -130,6 +130,6 @@ def get_new_posts():
break
while true:
while True:
get_new_posts()
time.sleep(600)