https://github.com/sixarm/youtube-html-parser
YouTube HTML parser scripts
https://github.com/sixarm/youtube-html-parser
html parser shell youtube
Last synced: 3 months ago
JSON representation
YouTube HTML parser scripts
- Host: GitHub
- URL: https://github.com/sixarm/youtube-html-parser
- Owner: SixArm
- Created: 2016-02-10T00:22:57.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2025-04-14T09:24:18.000Z (about 1 year ago)
- Last Synced: 2025-10-29T09:30:52.964Z (8 months ago)
- Topics: html, parser, shell, youtube
- Language: Shell
- Size: 4.88 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# YouTube HTML parser:
to output a list of simple URIs and titles
Syntax:
cat example.html | youtube-html-parser-to-simple-uri-and-title
## Example
Example input such as a typical YouTube list of related videos:
Example output:
https://www.youtube.com/watch?v=100 Lorem ipsum
https://www.youtube.com/watch?v=200 Dolor sit amet
https://www.youtube.com/watch?v=300 Consectetur adipiscing
Example that selects matching title text, then sorts by the title field:
cat example.html |
youtube-html-parser-to-simple-uri-and-title |
grep -i 'best of' |
sort -k2
## Implementation
This implementation does quick-and-dirty parsing of real world HTML.
TODO: upgrade from simple grep to real HTML parsing.