Metadata-Version: 2.1
Name: threads-scraper
Version: 1.1.0
Summary: A Python package for scraping Threads posts.
Home-page: https://github.com/ChenBingWei1201/threads_scraper
Author: ChenBingWei1201
Author-email: rain4030633@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: selenium >=4.0.0
Requires-Dist: pandas >=1.0.0
Requires-Dist: python-dotenv >=0.20.0

# threads_scraper

A Python package for scraping Threads posts.

## Installation

Install the package using pip:

```bash
pip install threads-scraper
```

## Usage

```python
from threads_scraper.scraper import ThreadsScraper

# Initialize the scraper
scraper = ThreadsScraper(
    username="your_username",
    password="your_password",
    driver_path="/path/to/chromedriver",
)

scroll_times = 10
csv_index = True

# Start the scraper
scraper.get_driver()

if scraper.login_to_threads():
    data = scraper.scrape(["keyword1", "keyword2"], scroll_times) # default scroll_times = 5
    scraper.save_to_csv(data, "data/threads_posts.csv", csv_index) # default csv_index = False

scraper.close()
```
