Skip to main content

Scrape the chat logs from TakeLessons

What is this?

If you noticed that TakeLessons doesn't have an API or a way to export your own data you can use this package to get at it.

How do I use it?

Prerequisites

  1. Install Chrome
  2. Find the correct selenium driver version for your install here
  3. Add it to PATH or make a note of where it is
  4. pip install takelessons-scraper

Example Usage:

# Assume some db object you can save your data to
db = SomeDBStore()
from takelessons_scraper import TakeLessonsScraper
chromedriver_path = '/path/to/chromedriver'
username = 'username'
password = 'password'
scraper = TakeLessonsScraper(chromedriver_path)
# login to load cookies behind scenes
scraper.login(username, password)
# get a block of chat data up to date
chat_date = '2020-01-01'
# you may need to sleep a bit
chat_log = scraper.get_chat_history(chat_date) # Chat obj, can get raw json back
db.save(chat_log)

Notes:

Please consider this a hobby project to be used as reference. Since it is a scraper I expect it to fail as regularly as the source is updated... which could be at any time and not within my control.

Release files for takelessons-scraper 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for takelessons-scraper 0.0.3
File Size Uploaded
takelessons-scraper-0.0.3.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for takelessons-scraper 0.0.3
File Interpreter ABI Platform
takelessons_scraper-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / takelessons-scraper-0.0.3.tar.gz

Download URL takelessons-scraper-0.0.3.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c7b0933878e1368936e0cc050592b37b3e4d873d3246cfccde2eeedcf457e8d8
BLAKE2b-256 checksum
How to use checksums
cdc0d3a145ae29b0478c85991c689af91e3dd022846c162b508d865d9d74f36d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.5

Release files / takelessons_scraper-0.0.3-py3-none-any.whl

Download URL takelessons_scraper-0.0.3-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
428254bb11fea99c2661c83e6e86e4b85cef6f74969980b145835ae05d2c0052
BLAKE2b-256 checksum
How to use checksums
989a1086fa97cc2afa6a8994917dfa94005c2732cebcc3eb5aff2c116795c5b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.5

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page