InstagramInfo 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: InstagramInfo
3
+ Version: 0.1.0
4
+ Summary: A simple library to get Instagram user profile info
5
+ Author: Manus User
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.7
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: httpx[http2]
12
+
13
+ # InstagramInfo
14
+
15
+ A simple Python library to get Instagram user profile information.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install InstagramInfo
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ ```python
26
+ from instagram_info import info
27
+
28
+ user_data = info("username")
29
+ print(user_data)
30
+ ```
@@ -0,0 +1,8 @@
1
+ README.md
2
+ pyproject.toml
3
+ InstagramInfo.egg-info/PKG-INFO
4
+ InstagramInfo.egg-info/SOURCES.txt
5
+ InstagramInfo.egg-info/dependency_links.txt
6
+ InstagramInfo.egg-info/requires.txt
7
+ InstagramInfo.egg-info/top_level.txt
8
+ instagram_info/__init__.py
@@ -0,0 +1 @@
1
+ httpx[http2]
@@ -0,0 +1 @@
1
+ instagram_info
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: InstagramInfo
3
+ Version: 0.1.0
4
+ Summary: A simple library to get Instagram user profile info
5
+ Author: Manus User
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.7
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: httpx[http2]
12
+
13
+ # InstagramInfo
14
+
15
+ A simple Python library to get Instagram user profile information.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install InstagramInfo
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ ```python
26
+ from instagram_info import info
27
+
28
+ user_data = info("username")
29
+ print(user_data)
30
+ ```
@@ -0,0 +1,18 @@
1
+ # InstagramInfo
2
+
3
+ A simple Python library to get Instagram user profile information.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install InstagramInfo
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```python
14
+ from instagram_info import info
15
+
16
+ user_data = info("username")
17
+ print(user_data)
18
+ ```
@@ -0,0 +1,34 @@
1
+ import os, sys, json
2
+
3
+ try:
4
+ import httpx
5
+ except ImportError:
6
+ os.system(f"{sys.executable} -m pip install httpx[http2]")
7
+ import httpx
8
+
9
+ def info(username: str):
10
+ url = f"https://i.instagram.com/api/v1/users/web_profile_info/?username={username}"
11
+ headers = {"X-IG-App-ID": "936619743392459"}
12
+
13
+ with httpx.Client(http2=True, headers=headers, timeout=10.0) as session:
14
+ response = session.get(url)
15
+ data = response.json()
16
+ user = data.get('data', {}).get('user', {})
17
+
18
+ return {
19
+ "name": user.get('full_name', 'N/A'),
20
+ "username": user.get('username', 'N/A'),
21
+ "id": user.get('id', 'N/A'),
22
+ "bio": user.get('biography', 'N/A'),
23
+ "followers": user.get('edge_followed_by', {}).get('count', 0),
24
+ "following": user.get('edge_follow', {}).get('count', 0),
25
+ "posts": user.get('edge_owner_to_timeline_media', {}).get('count', 0),
26
+ "is_private": user.get('is_private', False),
27
+ "is_verified": user.get('is_verified', False),
28
+ "is_professional_account": user.get('is_professional_account', False),
29
+ "category": user.get('category_name', 'N/A'),
30
+ "email": user.get('business_email') or user.get('public_email') or 'N/A',
31
+ "phone": user.get('business_phone_number') or user.get('public_phone_number') or 'N/A',
32
+ "external_url": user.get('external_url', 'N/A'),
33
+ "profile_pic": user.get('profile_pic_url', 'N/A')
34
+ }
@@ -0,0 +1,26 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "InstagramInfo"
7
+ version = "0.1.0"
8
+ authors = [
9
+ { name="Manus User" },
10
+ ]
11
+ description = "A simple library to get Instagram user profile info"
12
+ readme = "README.md"
13
+ requires-python = ">=3.7"
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+ dependencies = [
20
+ "httpx[http2]",
21
+ ]
22
+
23
+ [tool.setuptools.packages.find]
24
+ where = ["."]
25
+ include = ["instagram_info*"]
26
+
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+