Fix imports

This commit is contained in:
Neil 2023-05-28 23:44:30 +00:00
parent 8e6728af77
commit ad6215532b
2 changed files with 5 additions and 4 deletions

View File

@ -80,7 +80,7 @@ mastodon = Mastodon(
# api_base_url = 'https://pixelfed.tokyo/' # api_base_url = 'https://pixelfed.tokyo/'
) )
while True: while True:
get_new_posts(mastodon, mastodon_carousel_size, post_limit, id_filename, using_mastodon, mastodon_carousel_size, post_interval, fetched_user, user) get_new_posts(mastodon, mastodon_carousel_size, post_limit, id_filename, using_mastodon, mastodon_carousel_size, post_interval, fetched_user, user, id_session)
if scheduled: if scheduled:
break break
time.sleep(time_interval_sec) time.sleep(time_interval_sec)

View File

@ -6,9 +6,10 @@ import datetime
from already_posted import already_posted, mark_as_posted from already_posted import already_posted, mark_as_posted
from converters import split_array, try_to_get_carousel from converters import split_array, try_to_get_carousel
import hashlib import hashlib
import os
from instaloader import Profile, Instaloader, LatestStamps from instaloader import Profile, Instaloader, LatestStamps
def get_instagram_user(user, fetched_user): def get_instagram_user(user, fetched_user, id_session):
L = Instaloader() L = Instaloader()
print(Fore.GREEN + 'TEST 🚀 > Connecting to Instagram...') print(Fore.GREEN + 'TEST 🚀 > Connecting to Instagram...')
@ -77,9 +78,9 @@ def toot(urls, title, mastodon, fetched_user ):
print(Style.RESET_ALL) print(Style.RESET_ALL)
print(datetime.datetime.now()) print(datetime.datetime.now())
def get_new_posts(mastodon, mastodon_carousel_size, post_limit, already_posted_path, using_mastodon, carousel_size, post_interval, fetched_user, user): def get_new_posts(mastodon, mastodon_carousel_size, post_limit, already_posted_path, using_mastodon, carousel_size, post_interval, fetched_user, user, id_session):
# fetching user profile to get new posts # fetching user profile to get new posts
profile = get_instagram_user(user, fetched_user) profile = get_instagram_user(user, fetched_user, id_session)
# get list of all posts # get list of all posts
posts = profile.get_posts() posts = profile.get_posts()
stupidcounter = 0 stupidcounter = 0