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
- Install Chrome
- Find the correct selenium driver version for your install here
- Add it to PATH or make a note of where it is
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)
| File | Size | Uploaded | |
|---|---|---|---|
| takelessons-scraper-0.0.3.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|