An open API service indexing awesome lists of open source software.

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

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.