Skip to content

Commit 12cb2d3

Browse files
authored
Merge pull request #24 from brightdata/dev
Dev
2 parents 37d502a + 0d39730 commit 12cb2d3

File tree

18 files changed

+2382
-481
lines changed

18 files changed

+2382
-481
lines changed

CHANGELOG.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,67 @@
11
# Bright Data Python SDK Changelog
22

3+
## Version 2.1.1 - Instagram Scrapers & Version Centralization
4+
5+
### ✨ New Features
6+
7+
#### Complete Instagram Scraper Implementation
8+
9+
Full Instagram scraping support with URL-based extraction and discovery endpoints:
10+
11+
**URL-based Scraping (`client.scrape.instagram`)**
12+
- `profiles(url)` - Extract profile data from Instagram profile URL
13+
- `posts(url)` - Extract post data from Instagram post URL
14+
- `comments(url)` - Extract comments from Instagram post URL
15+
- `reels(url)` - Extract reel data from Instagram reel URL
16+
17+
**Discovery/Search (`client.search.instagram`)**
18+
- `profiles(user_name)` - Discover profile by exact username lookup
19+
- `posts(url, num_of_posts, start_date, end_date, post_type)` - Discover posts from profile
20+
- `reels(url, num_of_posts, start_date, end_date)` - Discover reels from profile
21+
- `reels_all(url, num_of_posts, start_date, end_date)` - Discover all reels from profile
22+
23+
```python
24+
async with BrightDataClient() as client:
25+
# URL-based scraping
26+
post = await client.scrape.instagram.posts("https://instagram.com/p/ABC123/")
27+
reel = await client.scrape.instagram.reels("https://instagram.com/reel/XYZ789/")
28+
29+
# Discovery by username
30+
profile = await client.search.instagram.profiles(user_name="nasa")
31+
32+
# Discover posts from profile with filters
33+
posts = await client.search.instagram.posts(
34+
url="https://instagram.com/nasa",
35+
num_of_posts=10,
36+
start_date="2024-01-01",
37+
end_date="2024-12-31"
38+
)
39+
```
40+
41+
### 🔧 Internal Improvements
42+
43+
#### Version Centralization
44+
45+
Version is now managed from a single source (`pyproject.toml`). All other files read it dynamically via `importlib.metadata`.
46+
47+
**Before (5 files to update):**
48+
- `pyproject.toml`
49+
- `src/brightdata/__init__.py`
50+
- `src/brightdata/_version.py`
51+
- `src/brightdata/core/engine.py`
52+
- `src/brightdata/cli/main.py`
53+
54+
**After (1 file to update):**
55+
- `pyproject.toml` ← Single source of truth
56+
57+
**Changes:**
58+
- `__init__.py` now uses `importlib.metadata.version("brightdata-sdk")`
59+
- `_version.py` deleted (no longer needed)
60+
- `engine.py` imports `__version__` for User-Agent header
61+
- `cli/main.py` imports `__version__` for `--version` flag
62+
63+
---
64+
365
## Version 2.1.0 - Async Mode, API Simplification & Bug Fixes
466

567
### ✨ New Features

notebooks/instagram.ipynb

Lines changed: 934 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)