Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg

# Virtual Environments
venv/
env/
ENV/
env.bak/
venv.bak/

# Instaloader Session Files
session-*
*.session

# Downloaded Instagram Content
*/
!asset/
!.vscode/
*.jpg
*.png
*.mp4
*.json.xz
*.txt.xz

# IDE
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store

# Credentials (if any config files are added later)
config.ini
.env
credentials.json

# Logs
*.log

# OS
.DS_Store
Thumbs.db
29 changes: 19 additions & 10 deletions instaOSINT.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ def osintig(US,PW):
{Wh} <----- {Gr}O S I N T {Wh}I N S T A G R A M {Wh}B Y {Gr}H U N B Y T S {Wh}----->
""")
IG_INSTA = instaloader.Instaloader()
IG_INSTA.login(US, PW)

try:
IG_INSTA.login(US, PW)
except instaloader.exceptions.TwoFactorAuthRequiredException:
print(f"\n {Wh}[ {Gr}! {Wh}] {Ye}Two-factor authentication required!")
two_factor_code = input(f" {Wh}[ {Gr}+ {Wh}] INPUT 2FA CODE : {Re}")
IG_INSTA.two_factor_login(two_factor_code)

if not IG_INSTA.context.is_logged_in:
IG_INSTA.context.log(f"\n {Wh}[ {Gr}+ {Wh}] {Re}Login failed!, you account wrong")
else:
Expand Down Expand Up @@ -80,17 +87,19 @@ def osintig(US,PW):
print(profile_pic)
print()
print(f" {Wh}[ {Gr}+ {Wh}]{Wh} Download {Gr}target post : ")
for post in profile.get_posts():
IG_INSTA.download_post(post, target=profile.username)
print()
print(f" {Wh}[ {Gr}+ {Wh}]{Wh} Download {Gr}igtv post : ")
for post in IG_INSTA.get_feed_posts():
IG_INSTA.download_post(post, target=profile.username)
try:
for post in profile.get_posts():
IG_INSTA.download_post(post, target=profile.username)
except Exception as e:
print(f" {Wh}[ {Ye}! {Wh}] {Ye}Error downloading posts: {str(e)}")
print()
print(f" {Wh}[ {Gr}+ {Wh}]{Wh} Download {Gr}highlights post : ")
for highlight in IG_INSTA.get_highlights(profile):
for post in highlight.get_items():
IG_INSTA.download_storyitem(post, target=profile.username)
try:
for highlight in IG_INSTA.get_highlights(profile):
for post in highlight.get_items():
IG_INSTA.download_storyitem(post, target=profile.username)
except Exception as e:
print(f" {Wh}[ {Ye}! {Wh}] {Ye}Error downloading highlights: {str(e)}")
print()

def animasi():
Expand Down