Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Avoiding Re-login
#1
hi,

I try to use this
https://github.com/ping/instagram_private_api

I managed to successfully login to my account with
 
from instagram_private_api import Client, ClientCompatPatch
 
user_name = 'user_name'
password = 'password'
 
api = Client(user_name, password)
results = api.feed_timeline()
items = results.get('items', [])
for item in items:
    # Manually patch the entity to match the public api as closely as possible, optional
    # To automatically patch entities, initialise the Client with auto_patch=True
    ClientCompatPatch.media(item)
    print(media['code'])
It is specified that it is necessary to avoid connecting each time and an example is given.
https://github.com/ping/instagram_privat...allback.py

How can I use it simply?

Thanks for your help
Yoriz write Sep-09-2021, 02:33 PM:
I removed a possible valid username and password.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  in a login interface when i try login with a user supposed to say test123 but nothing NullAdmin 3 2,286 Feb-20-2021, 04:43 AM
Last Post: bowlofred
  Avoiding too many if's Ted_Toad 6 2,554 Sep-17-2020, 07:18 PM
Last Post: Ted_Toad
  What is the better way of avoiding duplicate records after aggregation in pandas ? jagasrik 0 1,723 Aug-30-2020, 05:26 PM
Last Post: jagasrik
  Avoiding traceback not through input filtering Mark17 5 2,549 Oct-16-2019, 04:15 PM
Last Post: ichabod801
  Avoiding empty line in writing process csv file go127a 4 9,715 May-10-2019, 01:33 PM
Last Post: go127a

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020