Skip to main content

A Python package for scraping Threads posts.

Project description

threads_scraper

A Python package for scraping Threads posts.

Installation

Install the package using pip:

pip install threads-scraper

Usage

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

threads_scraper-1.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

threads_scraper-1.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file threads_scraper-1.1.0.tar.gz.

File metadata

  • Download URL: threads_scraper-1.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for threads_scraper-1.1.0.tar.gz
Algorithm Hash digest
SHA256 546e87418f79348a3cdfd991a97ebcf10a730e049984a72bc905a5ccd0f3437b
MD5 bec49a1a22bb9553d713d175d9601b70
BLAKE2b-256 200570a240ec4539ccf0c0ac52353852b39aa7c953edd4e1eb4ee5b5a32007d3

See more details on using hashes here.

File details

Details for the file threads_scraper-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for threads_scraper-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ee3e7a1af0c4e908764f98e217b13440ae76679db98dc499d26189b6cec5795
MD5 13b9f36549fd1d65b302d7044ed6969f
BLAKE2b-256 a0e22e72802cb12ca2f1ec769a49491a2c0cc998380b0e21d3da98d6c5dbacde

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page