This repository was archived by the owner on Feb 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstainfo.py
More file actions
50 lines (38 loc) · 1.47 KB
/
Copy pathinstainfo.py
File metadata and controls
50 lines (38 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# ///////////////////////////////////
import subprocess
import sys
def install_package(package_name):
"""Belirtilen paketi yükler."""
subprocess.check_call([sys.executable, "-m", "pip", "install", package_name])
try:
import instaloader
except ImportError:
print("Görünüşe göre 'instaloader' kütüphanesi yüklenmemiş. Yükleniyor...")
install_package('instaloader')
import instaloader # Kütüphaneyi yükledikten sonra tekrar import ediyoruz
# /////////////////////////////////////////////
def get_instagram_profile_info(username):
# Instaloader'ı başlat
loader = instaloader.Instaloader()
try:
# Profil bilgilerini çek
profile = instaloader.Profile.from_username(loader.context, username)
# Profil bilgilerini düzenle
profile_info = {
'username': profile.username,
'full_name': profile.full_name,
'bio': profile.biography,
'followers': profile.followers,
'following': profile.followees,
'posts': profile.mediacount,
'is_private': profile.is_private,
'is_verified': profile.is_verified,
}
return profile_info
except instaloader.exceptions.InstaloaderException as e:
return {'error': str(e)}
# Kullanıcıdan Instagram kullanıcı adını al
username = input('Instagram kullanıcı adını girin: ')
# Bilgileri al ve ekrana yazdır
info = get_instagram_profile_info(username)
print(info)