Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gatenlp/youtube-scraper
Scrape Youtube Data
https://github.com/gatenlp/youtube-scraper
Last synced: about 2 months ago
JSON representation
Scrape Youtube Data
- Host: GitHub
- URL: https://github.com/gatenlp/youtube-scraper
- Owner: GateNLP
- Created: 2020-01-23T17:51:30.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-01T12:07:54.000Z (about 1 year ago)
- Last Synced: 2024-04-16T07:59:29.707Z (9 months ago)
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 13
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Youtube-Scraper
Youtube scraper can be used to get JSON data from Youtube. It has 2 scripts i.e. keyword search and comment and reply extraction. Both the scripts are built on the top of Youtube API.
## Keyword Search
A search result contains information about a YouTube videos that matches the keywords in an API request. The command line script keyword-search-script.py contains the following parameters.
* First Parameter: Private API Key (************)
* Second Parameter: Keywords
* Third Parameter: Number of results needed (Enter a multiple of 50)If all the results are needed then just enter 'all' in case of third parameter.
Example:```bash
python keyword-search-script.py ************ "Green Day" all
```The JSON data gets saved as keyword_search.json in the same directory.
## Comments and Replies
This fetches all the comment and replies associated with particulare Youtube video ID. The command line script get-comments-script.py contains the following parameters.
* First Parameter: Private API Key (************)
* Second Parameter: Video IDExample:
```bash
python get-comments-script.py ************ i-2zY4BdP1s
```The JSON data gets saved as comments.json in the same directory.
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.