Fix imports
This commit is contained in:
parent
8e6728af77
commit
ad6215532b
|
@ -80,7 +80,7 @@ mastodon = Mastodon(
|
|||
# api_base_url = 'https://pixelfed.tokyo/'
|
||||
)
|
||||
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:
|
||||
break
|
||||
time.sleep(time_interval_sec)
|
||||
|
|
|
@ -6,9 +6,10 @@ import datetime
|
|||
from already_posted import already_posted, mark_as_posted
|
||||
from converters import split_array, try_to_get_carousel
|
||||
import hashlib
|
||||
import os
|
||||
from instaloader import Profile, Instaloader, LatestStamps
|
||||
|
||||
def get_instagram_user(user, fetched_user):
|
||||
def get_instagram_user(user, fetched_user, id_session):
|
||||
L = Instaloader()
|
||||
|
||||
print(Fore.GREEN + 'TEST 🚀 > Connecting to Instagram...')
|
||||
|
@ -77,9 +78,9 @@ def toot(urls, title, mastodon, fetched_user ):
|
|||
print(Style.RESET_ALL)
|
||||
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
|
||||
profile = get_instagram_user(user, fetched_user)
|
||||
profile = get_instagram_user(user, fetched_user, id_session)
|
||||
# get list of all posts
|
||||
posts = profile.get_posts()
|
||||
stupidcounter = 0
|
||||
|
|
Loading…
Reference in New Issue