Asynchronous scraper to download youtube community posts
Project description
YoutubeCommunityScraper | yp-dl
yp-dl is an asynchronous scraper for downloading Youtube Community posts in json format.
Motivation
Youtube stops retrieving old community posts after 200 posts on a channel. There's no way to access/view older posts if you do not have the link to them or their ID.
Installation
pip install yp-dl
⚠️ Notice: For people on version 0.9.11 and before, you won't be able to use pip install upgrade yp-dl since I've upgraded the lxml version dependency above what is specified (refused to build on the old version suddenly for some reason). Please uninstall and then install yp-dl again to get the latest version.
Features
- Asynchronous support
- For every post it retrieves:
- post_link
- time_since
- utc_timestamp at download
- video_link
- image_links
- text_content
- poll_content
- Update support for the json files when new posts are made
- Progress visualization during download
Usage
usage: yp-dl [-h] [-f FOLDER_PATH] [-r] [-u] [-v] [-o] [-d] link [link ...]
An asynchronous scraper that downloads youtube posts from youtube channels in json format.
positional arguments:
link Provide any number of links.
Link example: https://www.youtube.com/@3blue1brown
options:
-h, --help show this help message and exit
-f FOLDER_PATH, --folder-path FOLDER_PATH
Provide the path of the folder you wish to store/update your json files.
If it's in the current working directory (CWD), just type the folder
name. If none is provided, everything will be stored/updated in the CWD.
-r, --reverse Reverses the order of the posts from oldest first to newest first.
Be wary though, if you use this option with --update, your post order
will be messed up.
-u, --update Appends the existing json file(s) with the new posts.
-v, --verbose Gives more details about what's going on when the program runs.
-o, --overwrite-cookie
Overwrites the SOCS cookie in the cookies.txt file with a Default SOCS
cookie within the project. Use if having problems retrieving posts.
-d, --delete-cookie Removes the cookie file to generate it again. Use if your SOCS key
has expired (lifetime is 2 years).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yp_dl-0.9.17.tar.gz.
File metadata
- Download URL: yp_dl-0.9.17.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26051dd626f3be224ebc67db3d13075df9c7249e5e646bde93cf6ce488c2fbce
|
|
| MD5 |
612507fe392c2340721475018dd45c10
|
|
| BLAKE2b-256 |
5ec4bd39c0b21b866f6ef160f5b42cb6507bbb07c72d0c4f3c41aa1cefabf206
|
Provenance
The following attestation bundles were made for yp_dl-0.9.17.tar.gz:
Publisher:
python-publish.yml on NothingNaN/YoutubeCommunityScraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yp_dl-0.9.17.tar.gz -
Subject digest:
26051dd626f3be224ebc67db3d13075df9c7249e5e646bde93cf6ce488c2fbce - Sigstore transparency entry: 188076418
- Sigstore integration time:
-
Permalink:
NothingNaN/YoutubeCommunityScraper@7a2d3b1278d87d13b1328a4e584cf87d8d21f957 -
Branch / Tag:
refs/tags/v0.9.17 - Owner: https://github.com/NothingNaN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7a2d3b1278d87d13b1328a4e584cf87d8d21f957 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yp_dl-0.9.17-py3-none-any.whl.
File metadata
- Download URL: yp_dl-0.9.17-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a227d9f1c84bd55e9f753c332d4e07432e5251b9c0007f935801b4ffefe42b7
|
|
| MD5 |
778dbab8400a2403e709514b374c933e
|
|
| BLAKE2b-256 |
16ce2376f9c2084dc7d12f29fbe5a4e1344322b73a5620830c796bc62759007f
|
Provenance
The following attestation bundles were made for yp_dl-0.9.17-py3-none-any.whl:
Publisher:
python-publish.yml on NothingNaN/YoutubeCommunityScraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yp_dl-0.9.17-py3-none-any.whl -
Subject digest:
0a227d9f1c84bd55e9f753c332d4e07432e5251b9c0007f935801b4ffefe42b7 - Sigstore transparency entry: 188076422
- Sigstore integration time:
-
Permalink:
NothingNaN/YoutubeCommunityScraper@7a2d3b1278d87d13b1328a4e584cf87d8d21f957 -
Branch / Tag:
refs/tags/v0.9.17 - Owner: https://github.com/NothingNaN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7a2d3b1278d87d13b1328a4e584cf87d8d21f957 -
Trigger Event:
push
-
Statement type: