# InstagramGrabber
<div align="center">
<p align="center">
<a href="https://pypi.org/project/InstagramGrabber/"><img src="https://img.shields.io/pypi/dm/InstagramGrabber?style=flat-square" alt="pypi"/></a>
<a href="https://pypi.org/project/InstagramGrabber/"><img src="https://img.shields.io/pypi/v/InstagramGrabber?style=flat-square" /></a>
<a class="reference external image-reference" href="https://pypi.python.org/pypi/InstagramGrabber/"><img alt="Python Versions" src="https://img.shields.io/pypi/pyversions/InstagramGrabber.svg"></a>
</p>
</div>
InstagramGrabber adalah modul Python yang memungkinkan pengembang mengakses dan mengambil data dari Instagram. Dengan fungsionalitas seperti mengunduh gambar, video, dan informasi profil pengguna, modul ini menyediakan solusi efektif untuk integrasi Instagram dalam proyek tanpa perlu mengakses API resmi. Memudahkan ekstraksi data, InstagramGrabber cocok untuk berbagai aplikasi dan skenario pengembangan perangkat lunak.
---
## Fiture
- **Instagram Post Grabber**: mengambil semua informasi tentang postingan
- **Instagram User Grabber**: mengambil semua informasi tentang user
- **Instagram User Posts Grabber**: mengambil semua informasi tentang posts user
- **Instagram User Reels Grabber**: mengambil semua informasi tentang reels user
- **Instagram User Stories Grabber**: mengambil semua informasi tentang stories user
## Installation
### Using Git
```bash
git clone https://github.com/SukunDev/instagramgrabber.git
cd instagramgrabber
python -m setup.py install
```
### Using PIP
```bash
pip install InstagramGrabber
```
## Usage
### Login
Login dulu sebelum pakai modul ini. Ambil cookies untuk aktivitas lebih lanjut.
```python
from InstagramGrabber import Instagram
from dotenv import load_dotenv
import os
load_dotenv()
username = os.environ.get("IG_USERNAME", None) # ganti dengan instagram username kamu
password = os.environ.get("IG_PASSWORD", None) # ganti dengan instagram password kamu
ig = Instagram(username=username, password=password)
account = ig.login()
print(account['username']) # ini akan mengambil username instagram kamu jika sudah selesai
```
### Get Post
Ambil link post instagram yang kalian inginkan, Kalian bisa menggunakan url **Post** atau **Reel**
```python
from InstagramGrabber import Instagram
from dotenv import load_dotenv
import os
load_dotenv()
username = os.environ.get("IG_USERNAME", None) # ganti dengan instagram username kamu
password = os.environ.get("IG_PASSWORD", None) # ganti dengan instagram password kamu
ig = Instagram(username=username, password=password)
if not os.path.exists(f"./instagram_cookies/{username}_cookies"):
print("cookies tidak ditemukan")
try:
print("mencoba login")
user = ig.login()
print(f"berhasil login [{user['username']}]")
except Exception as e:
print(str(e))
print("\n=============\n")
post = ig.get_post(url="https://www.instagram.com/p/C0oC-bchkjw")
print(f"user id: {post.user.user_id}") # ambil user user id
print(f"username: {post.user.username}") # ambil user username
print(f"full name: {post.user.full_name}") # ambil user full name
print(f"category name: {post.user.category_name}") # ambil user category name
print(f"biography: {post.user.biography}") # ambil user biography
print(f"jumlah following: {post.user.following}") # ambil user jumlah following
print(f"jumlah followers: {post.user.followers}") # ambil user jumlah followers
print(f"jumlah posts: {post.user.posts_count}") # ambil user jumlah posts
print(f"profile picture: {post.user.profile_picture}") # ambil user profile picture
if post.media: # check media ada atau tidak
print(post.media.prettify(indent=2)) # ambil post info
```
### Get User
Ambil username instagram target dan jalankan program ini
```python
from InstagramGrabber import Instagram
from dotenv import load_dotenv
import os
load_dotenv()
username = os.environ.get("IG_USERNAME", None) # ganti dengan instagram username kamu
password = os.environ.get("IG_PASSWORD", None) # ganti dengan instagram password kamu
ig = Instagram(username=username, password=password)
if not os.path.exists(f"./instagram_cookies/{username}_cookies"):
print("cookies tidak ditemukan")
try:
print("mencoba login")
user = ig.login()
print(f"berhasil login [{user['username']}]")
except Exception as e:
print(str(e))
print("\n=============\n")
user = ig.get_user("hololive.animation")
print(f"user id: {user.user_id}") # ambil user user id
print(f"username: {user.username}") # ambil user username
print(f"full name: {user.full_name}") # ambil user full name
print(f"category name: {user.category_name}") # ambil user category name
print(f"biography: {user.biography}") # ambil user biography
print(f"jumlah following: {user.following}") # ambil user jumlah following
print(f"jumlah followers: {user.followers}") # ambil user jumlah followers
print(f"jumlah posts: {user.posts_count}") # ambil user jumlah posts
print(f"profile picture: {user.profile_picture}") # ambil user profile picture
```
### Get All User Posts
Ambil username instagram target dan jalankan program ini
```python
from InstagramGrabber import Instagram
from dotenv import load_dotenv
import os
load_dotenv()
username = os.environ.get("IG_USERNAME", None) # ganti dengan instagram username kamu
password = os.environ.get("IG_PASSWORD", None) # ganti dengan instagram password kamu
ig = Instagram(username=username, password=password)
if not os.path.exists(f"./instagram_cookies/{username}_cookies"):
print("cookies tidak ditemukan")
try:
print("mencoba login")
user = ig.login()
print(f"berhasil login [{user['username']}]")
except Exception as e:
print(str(e))
print("\n=============\n")
user = ig.get_user("hololive.animation")
print(f"user id: {user.user_id}") # ambil user user id
print(f"username: {user.username}") # ambil user username
print(f"full name: {user.full_name}") # ambil user full name
print(f"category name: {user.category_name}") # ambil user category name
print(f"biography: {user.biography}") # ambil user biography
print(f"jumlah following: {user.following}") # ambil user jumlah following
print(f"jumlah followers: {user.followers}") # ambil user jumlah followers
print(f"jumlah posts: {user.posts_count}") # ambil user jumlah posts
print(f"profile picture: {user.profile_picture}") # ambil user profile picture
max_id = None
more_available = True
while more_available:
posts = user.get_post(max_id=max_id)
max_id = posts.max_id
more_available = posts.more_available
print(f"Next max_id: {max_id}")
print(f"More Available: {more_available}")
if posts.media: # check media ada atau tidak
print(posts.media.prettify(indent=2))
```
### Get All User Reels
Ambil username instagram target dan jalankan program ini
```python
from InstagramGrabber import Instagram
from dotenv import load_dotenv
import os
load_dotenv()
username = os.environ.get("IG_USERNAME", None) # ganti dengan instagram username kamu
password = os.environ.get("IG_PASSWORD", None) # ganti dengan instagram password kamu
ig = Instagram(username=username, password=password)
if not os.path.exists(f"./instagram_cookies/{username}_cookies"):
print("cookies tidak ditemukan")
try:
print("mencoba login")
user = ig.login()
print(f"berhasil login [{user['username']}]")
except Exception as e:
print(str(e))
print("\n=============\n")
user = ig.get_user("hololive.animation")
print(f"user id: {user.user_id}") # ambil user user id
print(f"username: {user.username}") # ambil user username
print(f"full name: {user.full_name}") # ambil user full name
print(f"category name: {user.category_name}") # ambil user category name
print(f"biography: {user.biography}") # ambil user biography
print(f"jumlah following: {user.following}") # ambil user jumlah following
print(f"jumlah followers: {user.followers}") # ambil user jumlah followers
print(f"jumlah posts: {user.posts_count}") # ambil user jumlah posts
print(f"profile picture: {user.profile_picture}") # ambil user profile picture
max_id = None
more_available = True
while more_available:
reels = user.get_reel(max_id=max_id)
max_id = reels.max_id
more_available = reels.more_available
print(f"Next max_id: {max_id}")
print(f"More Available: {more_available}")
if reels.media: # check media ada atau tidak
print(reels.media.prettify(indent=2))
```
### Get All User Stories
Ambil username instagram target dan jalankan program ini
```python
from InstagramGrabber import Instagram
from dotenv import load_dotenv
import os
load_dotenv()
username = os.environ.get("IG_USERNAME", None) # ganti dengan instagram username kamu
password = os.environ.get("IG_PASSWORD", None) # ganti dengan instagram password kamu
ig = Instagram(username=username, password=password)
if not os.path.exists(f"./instagram_cookies/{username}_cookies"):
print("cookies tidak ditemukan")
try:
print("mencoba login")
user = ig.login()
print(f"berhasil login [{user['username']}]")
except Exception as e:
print(str(e))
print("\n=============\n")
user = ig.get_user("hololive.animation")
print(f"user id: {user.user_id}") # ambil user user id
print(f"username: {user.username}") # ambil user username
print(f"full name: {user.full_name}") # ambil user full name
print(f"category name: {user.category_name}") # ambil user category name
print(f"biography: {user.biography}") # ambil user biography
print(f"jumlah following: {user.following}") # ambil user jumlah following
print(f"jumlah followers: {user.followers}") # ambil user jumlah followers
print(f"jumlah posts: {user.posts_count}") # ambil user jumlah posts
print(f"profile picture: {user.profile_picture}") # ambil user profile picture
stories = user.get_stories()
if stories.media: # check media ada atau tidak
print(stories.media.prettify(indent=2))
```
## Kontribusi
Jika Anda ingin berkontribusi pada proyek ini, kami sangat menghargai setiap bentuk dukungan. Silakan buka [Panduan Kontribusi](CONTRIBUTING.md) untuk informasi lebih lanjut.
## Lisensi
Proyek ini dilisensikan di bawah [MIT License](LICENSE).
---
Dikembangkan oleh [SukunDev](https://github.com/SukunDev)
Raw data
{
"_id": null,
"home_page": "https://github.com/sukundev/instagramgrabber",
"name": "InstagramGrabber",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "instagram,instagram-grabber,instagram grabber,python3,api,instagram api",
"author": "SukunDev",
"author_email": "sukundev32@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/f3/ca/a4dcc0f4531691e82da175ea78d095f1b8007c383eef303c2ccf05569a58/InstagramGrabber-2.0.0.tar.gz",
"platform": null,
"description": "# InstagramGrabber\n\n<div align=\"center\">\n <p align=\"center\">\n\t<a href=\"https://pypi.org/project/InstagramGrabber/\"><img src=\"https://img.shields.io/pypi/dm/InstagramGrabber?style=flat-square\" alt=\"pypi\"/></a>\n\t<a href=\"https://pypi.org/project/InstagramGrabber/\"><img src=\"https://img.shields.io/pypi/v/InstagramGrabber?style=flat-square\" /></a>\n <a class=\"reference external image-reference\" href=\"https://pypi.python.org/pypi/InstagramGrabber/\"><img alt=\"Python Versions\" src=\"https://img.shields.io/pypi/pyversions/InstagramGrabber.svg\"></a>\n </p>\n</div>\n\nInstagramGrabber adalah modul Python yang memungkinkan pengembang mengakses dan mengambil data dari Instagram. Dengan fungsionalitas seperti mengunduh gambar, video, dan informasi profil pengguna, modul ini menyediakan solusi efektif untuk integrasi Instagram dalam proyek tanpa perlu mengakses API resmi. Memudahkan ekstraksi data, InstagramGrabber cocok untuk berbagai aplikasi dan skenario pengembangan perangkat lunak.\n\n---\n\n## Fiture\n\n- **Instagram Post Grabber**: mengambil semua informasi tentang postingan\n- **Instagram User Grabber**: mengambil semua informasi tentang user\n- **Instagram User Posts Grabber**: mengambil semua informasi tentang posts user\n- **Instagram User Reels Grabber**: mengambil semua informasi tentang reels user\n- **Instagram User Stories Grabber**: mengambil semua informasi tentang stories user\n\n## Installation\n\n### Using Git\n\n```bash\ngit clone https://github.com/SukunDev/instagramgrabber.git\ncd instagramgrabber\npython -m setup.py install\n```\n\n### Using PIP\n\n```bash\npip install InstagramGrabber\n```\n\n## Usage\n\n### Login\n\nLogin dulu sebelum pakai modul ini. Ambil cookies untuk aktivitas lebih lanjut.\n\n```python\nfrom InstagramGrabber import Instagram\nfrom dotenv import load_dotenv\nimport os\n\n\nload_dotenv()\n\nusername = os.environ.get(\"IG_USERNAME\", None) # ganti dengan instagram username kamu\npassword = os.environ.get(\"IG_PASSWORD\", None) # ganti dengan instagram password kamu\n\nig = Instagram(username=username, password=password)\naccount = ig.login()\nprint(account['username']) # ini akan mengambil username instagram kamu jika sudah selesai\n```\n\n### Get Post\n\nAmbil link post instagram yang kalian inginkan, Kalian bisa menggunakan url **Post** atau **Reel**\n\n```python\nfrom InstagramGrabber import Instagram\nfrom dotenv import load_dotenv\nimport os\n\n\nload_dotenv()\n\nusername = os.environ.get(\"IG_USERNAME\", None) # ganti dengan instagram username kamu\npassword = os.environ.get(\"IG_PASSWORD\", None) # ganti dengan instagram password kamu\n\nig = Instagram(username=username, password=password)\n\nif not os.path.exists(f\"./instagram_cookies/{username}_cookies\"):\n print(\"cookies tidak ditemukan\")\n try:\n print(\"mencoba login\")\n user = ig.login()\n print(f\"berhasil login [{user['username']}]\")\n except Exception as e:\n print(str(e))\n print(\"\\n=============\\n\")\n\npost = ig.get_post(url=\"https://www.instagram.com/p/C0oC-bchkjw\")\nprint(f\"user id: {post.user.user_id}\") # ambil user user id\nprint(f\"username: {post.user.username}\") # ambil user username\nprint(f\"full name: {post.user.full_name}\") # ambil user full name\nprint(f\"category name: {post.user.category_name}\") # ambil user category name\nprint(f\"biography: {post.user.biography}\") # ambil user biography\nprint(f\"jumlah following: {post.user.following}\") # ambil user jumlah following\nprint(f\"jumlah followers: {post.user.followers}\") # ambil user jumlah followers\nprint(f\"jumlah posts: {post.user.posts_count}\") # ambil user jumlah posts\nprint(f\"profile picture: {post.user.profile_picture}\") # ambil user profile picture\n\nif post.media: # check media ada atau tidak\n print(post.media.prettify(indent=2)) # ambil post info\n```\n\n### Get User\n\nAmbil username instagram target dan jalankan program ini\n\n```python\nfrom InstagramGrabber import Instagram\nfrom dotenv import load_dotenv\nimport os\n\n\nload_dotenv()\n\nusername = os.environ.get(\"IG_USERNAME\", None) # ganti dengan instagram username kamu\npassword = os.environ.get(\"IG_PASSWORD\", None) # ganti dengan instagram password kamu\n\nig = Instagram(username=username, password=password)\n\nif not os.path.exists(f\"./instagram_cookies/{username}_cookies\"):\n print(\"cookies tidak ditemukan\")\n try:\n print(\"mencoba login\")\n user = ig.login()\n print(f\"berhasil login [{user['username']}]\")\n except Exception as e:\n print(str(e))\n print(\"\\n=============\\n\")\n\n\n\nuser = ig.get_user(\"hololive.animation\")\nprint(f\"user id: {user.user_id}\") # ambil user user id\nprint(f\"username: {user.username}\") # ambil user username\nprint(f\"full name: {user.full_name}\") # ambil user full name\nprint(f\"category name: {user.category_name}\") # ambil user category name\nprint(f\"biography: {user.biography}\") # ambil user biography\nprint(f\"jumlah following: {user.following}\") # ambil user jumlah following\nprint(f\"jumlah followers: {user.followers}\") # ambil user jumlah followers\nprint(f\"jumlah posts: {user.posts_count}\") # ambil user jumlah posts\nprint(f\"profile picture: {user.profile_picture}\") # ambil user profile picture\n```\n\n### Get All User Posts\n\nAmbil username instagram target dan jalankan program ini\n\n```python\nfrom InstagramGrabber import Instagram\nfrom dotenv import load_dotenv\nimport os\n\n\nload_dotenv()\n\nusername = os.environ.get(\"IG_USERNAME\", None) # ganti dengan instagram username kamu\npassword = os.environ.get(\"IG_PASSWORD\", None) # ganti dengan instagram password kamu\n\nig = Instagram(username=username, password=password)\n\nif not os.path.exists(f\"./instagram_cookies/{username}_cookies\"):\n print(\"cookies tidak ditemukan\")\n try:\n print(\"mencoba login\")\n user = ig.login()\n print(f\"berhasil login [{user['username']}]\")\n except Exception as e:\n print(str(e))\n print(\"\\n=============\\n\")\n\nuser = ig.get_user(\"hololive.animation\")\nprint(f\"user id: {user.user_id}\") # ambil user user id\nprint(f\"username: {user.username}\") # ambil user username\nprint(f\"full name: {user.full_name}\") # ambil user full name\nprint(f\"category name: {user.category_name}\") # ambil user category name\nprint(f\"biography: {user.biography}\") # ambil user biography\nprint(f\"jumlah following: {user.following}\") # ambil user jumlah following\nprint(f\"jumlah followers: {user.followers}\") # ambil user jumlah followers\nprint(f\"jumlah posts: {user.posts_count}\") # ambil user jumlah posts\nprint(f\"profile picture: {user.profile_picture}\") # ambil user profile picture\n\nmax_id = None\nmore_available = True\nwhile more_available:\n posts = user.get_post(max_id=max_id)\n max_id = posts.max_id\n more_available = posts.more_available\n print(f\"Next max_id: {max_id}\")\n print(f\"More Available: {more_available}\")\n if posts.media: # check media ada atau tidak\n print(posts.media.prettify(indent=2))\n\n```\n\n### Get All User Reels\n\nAmbil username instagram target dan jalankan program ini\n\n```python\nfrom InstagramGrabber import Instagram\nfrom dotenv import load_dotenv\nimport os\n\n\nload_dotenv()\n\nusername = os.environ.get(\"IG_USERNAME\", None) # ganti dengan instagram username kamu\npassword = os.environ.get(\"IG_PASSWORD\", None) # ganti dengan instagram password kamu\n\nig = Instagram(username=username, password=password)\n\nif not os.path.exists(f\"./instagram_cookies/{username}_cookies\"):\n print(\"cookies tidak ditemukan\")\n try:\n print(\"mencoba login\")\n user = ig.login()\n print(f\"berhasil login [{user['username']}]\")\n except Exception as e:\n print(str(e))\n print(\"\\n=============\\n\")\n\nuser = ig.get_user(\"hololive.animation\")\nprint(f\"user id: {user.user_id}\") # ambil user user id\nprint(f\"username: {user.username}\") # ambil user username\nprint(f\"full name: {user.full_name}\") # ambil user full name\nprint(f\"category name: {user.category_name}\") # ambil user category name\nprint(f\"biography: {user.biography}\") # ambil user biography\nprint(f\"jumlah following: {user.following}\") # ambil user jumlah following\nprint(f\"jumlah followers: {user.followers}\") # ambil user jumlah followers\nprint(f\"jumlah posts: {user.posts_count}\") # ambil user jumlah posts\nprint(f\"profile picture: {user.profile_picture}\") # ambil user profile picture\n\nmax_id = None\nmore_available = True\nwhile more_available:\n reels = user.get_reel(max_id=max_id)\n max_id = reels.max_id\n more_available = reels.more_available\n print(f\"Next max_id: {max_id}\")\n print(f\"More Available: {more_available}\")\n if reels.media: # check media ada atau tidak\n print(reels.media.prettify(indent=2))\n```\n\n### Get All User Stories\n\nAmbil username instagram target dan jalankan program ini\n\n```python\nfrom InstagramGrabber import Instagram\nfrom dotenv import load_dotenv\nimport os\n\n\nload_dotenv()\n\nusername = os.environ.get(\"IG_USERNAME\", None) # ganti dengan instagram username kamu\npassword = os.environ.get(\"IG_PASSWORD\", None) # ganti dengan instagram password kamu\n\nig = Instagram(username=username, password=password)\n\nif not os.path.exists(f\"./instagram_cookies/{username}_cookies\"):\n print(\"cookies tidak ditemukan\")\n try:\n print(\"mencoba login\")\n user = ig.login()\n print(f\"berhasil login [{user['username']}]\")\n except Exception as e:\n print(str(e))\n print(\"\\n=============\\n\")\n\nuser = ig.get_user(\"hololive.animation\")\nprint(f\"user id: {user.user_id}\") # ambil user user id\nprint(f\"username: {user.username}\") # ambil user username\nprint(f\"full name: {user.full_name}\") # ambil user full name\nprint(f\"category name: {user.category_name}\") # ambil user category name\nprint(f\"biography: {user.biography}\") # ambil user biography\nprint(f\"jumlah following: {user.following}\") # ambil user jumlah following\nprint(f\"jumlah followers: {user.followers}\") # ambil user jumlah followers\nprint(f\"jumlah posts: {user.posts_count}\") # ambil user jumlah posts\nprint(f\"profile picture: {user.profile_picture}\") # ambil user profile picture\n\nstories = user.get_stories()\nif stories.media: # check media ada atau tidak\n print(stories.media.prettify(indent=2))\n```\n\n## Kontribusi\n\nJika Anda ingin berkontribusi pada proyek ini, kami sangat menghargai setiap bentuk dukungan. Silakan buka [Panduan Kontribusi](CONTRIBUTING.md) untuk informasi lebih lanjut.\n\n## Lisensi\n\nProyek ini dilisensikan di bawah [MIT License](LICENSE).\n\n---\n\nDikembangkan oleh [SukunDev](https://github.com/SukunDev)\n",
"bugtrack_url": null,
"license": "The Unlicense (Unlicense)",
"summary": "Simple project to grab instagram info",
"version": "2.0.0",
"project_urls": {
"Homepage": "https://github.com/sukundev/instagramgrabber"
},
"split_keywords": [
"instagram",
"instagram-grabber",
"instagram grabber",
"python3",
"api",
"instagram api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "63703a808dbb2b548103189e7d3ab2419d0444431808153e925c1f6f8f3ba21b",
"md5": "73483b290974709c241541b938705c3e",
"sha256": "73e5d9a4ca593349fd07807fe48a37387d1ab3891a2e2e1db192d39f2f8b8301"
},
"downloads": -1,
"filename": "InstagramGrabber-2.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "73483b290974709c241541b938705c3e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 14453,
"upload_time": "2024-01-10T13:17:07",
"upload_time_iso_8601": "2024-01-10T13:17:07.328063Z",
"url": "https://files.pythonhosted.org/packages/63/70/3a808dbb2b548103189e7d3ab2419d0444431808153e925c1f6f8f3ba21b/InstagramGrabber-2.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f3caa4dcc0f4531691e82da175ea78d095f1b8007c383eef303c2ccf05569a58",
"md5": "40e3b5be3146b3ab374ca39f05968764",
"sha256": "a55d65477669254ea434d4de77019cefcdc05d632b959892bdc6ddbce8ba5f0e"
},
"downloads": -1,
"filename": "InstagramGrabber-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "40e3b5be3146b3ab374ca39f05968764",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 9982,
"upload_time": "2024-01-10T13:17:09",
"upload_time_iso_8601": "2024-01-10T13:17:09.035306Z",
"url": "https://files.pythonhosted.org/packages/f3/ca/a4dcc0f4531691e82da175ea78d095f1b8007c383eef303c2ccf05569a58/InstagramGrabber-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-10 13:17:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sukundev",
"github_project": "instagramgrabber",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "instagramgrabber"
}