aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: a2efdbc437375f6dd9305abdce0f134e0a9b8322 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[![MELPA](https://melpa.org/packages/yeetube-badge.svg)](https://melpa.org/#/yeetube)

# YeeTube

![yeetube showcase](/showcase/example.gif?raw=true "Showcase Yeetube")
## About 

This package provides the ability to scrape YouTube, with the results
displayed in a proced-like buffer.


Package functionality includes:

- Query YouTube
- Play video url *by default using mpv*
- Bookmark/Save video url
- Download video *using yt-dlp*
- A minimal yt-dlp front-end, *which is independent of the rest
  YouTube functionality*.

*This package does not use Invidious or YouTube's API, just "parses"
html & json.*


## Installation 
This package is available via [MELPA](https://melpa.org/#/yeetube)

### Straight.el

``` emacs-lisp
(straight-use-package 
 '(yeetube :type git
	       :host nil
	       :repo "https://git.thanosapollo.org/yeetube"))
```


### Manual
``` shell
$ git clone https://git.thanosapollo.org/yeetube
```

*Add this to your emacs configuration:*

``` emacs-lisp
   (add-to-list 'load-path "/path/to/yeetube")
   (load-file "~/path/to/yeetube.el")
   (require 'yeetube)
```

### Dependencies
- [mpv](https://mpv.io/): default multimedia player
- [yt-dlp](https://github.com/yt-dlp/yt-dlp): download functionality

*Debian/Ubuntu*
``` shell
$ sudo apt install mpv yt-dlp
```

## Configuration 
### Media Player 
By default `yeetube-player` is set to `yeetube-mpv-play`, you can
use [mpv.el](https://github.com/kljohann/mpv.el),
[GNU/Emms](https://www.gnu.org/software/emms/) or other similar
packages like so:

``` emacs-lisp
(setf yeetube-player #'emms-play-url)
```

Make sure that the media player of your choice can directly play
youtube urls.

### Apply Filters

To filter the search results based on a specific criterion, you can
modify the `yeetube-filter` value to your preferred option.

For example:

```emacs-lisp
(setf yeetube-filter "Views")
```

This will filter & sort the search results according to the number of views.

### Torsocks

If you are using `yeetube-mpv-play` as your media player & running
[tor](https://wiki.archlinux.org/title/Tor), you can use torsocks to
route your traffic via the tor network.

``` emacs-lisp
(setf yeetube-mpv-enable-torsocks t)
```

*You can toggle that option with `yeetube-mpv-toggle-torsocks`*

### Video Quality

If you are using `yeetube-mpv-play` as your media player, you can
specify video quality using `yeetube-mpv-change-video-quality`
*recommended* or by using this snippet.

``` emacs-lisp
(setf yeetube-mpv-video-quality "720") ;; Accepted values include: 1080, 720, 480, 360, 240, 144
```