summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile13
-rw-r--r--README.md6
-rw-r--r--assets/js/watch.js2
-rw-r--r--src/invidious/yt_backend/connection_pool.cr3
-rw-r--r--src/invidious/yt_backend/youtube_api.cr16
5 files changed, 24 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 29be727c..929b11e1 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,10 @@ ifeq ($(DISABLE_QUIC), 1)
FLAGS += -Ddisable_quic
endif
+ifeq ($(API_ONLY), 1)
+ FLAGS += -Dapi_only
+endif
+
# -----------------------
# Main
@@ -106,11 +110,12 @@ help:
@echo ""
@echo "Build options available for this Makefile:"
@echo ""
- @echo " RELEASE Make a release build (Default: 1)"
- @echo " STATIC Link libraries statically (Default: 0)"
+ @echo " RELEASE Make a release build (Default: 1)"
+ @echo " STATIC Link libraries statically (Default: 0)"
@echo ""
- @echo " DISABLE_QUIC Disable support for QUIC (Default: 0)"
- @echo " NO_DBG_SYMBOLS Strip debug symbols (Default: 0)"
+ @echo " API_ONLY Build invidious without a GUI (Default: 0)"
+ @echo " DISABLE_QUIC Disable support for QUIC (Default: 0)"
+ @echo " NO_DBG_SYMBOLS Strip debug symbols (Default: 0)"
diff --git a/README.md b/README.md
index 602ad2e2..88770383 100644
--- a/README.md
+++ b/README.md
@@ -153,9 +153,9 @@ Weblate also allows you to log-in with major SSO providers like Github, Gitlab,
- [WatchTube](https://github.com/WatchTubeTeam/WatchTube): Powerful YouTube client for Apple Watch.
- [Yattee](https://github.com/yattee/yattee): Alternative YouTube frontend for iPhone, iPad, Mac and Apple TV.
- [TubiTui](https://codeberg.org/777/TubiTui): A lightweight, libre, TUI-based YouTube client.
-- [Ytfzf](https://github.com/pystardust/ytfzf): A posix script to find and watch youtube videos from the terminal. (Without API)
-- [Playlet](https://github.com/iBicha/playlet): Unofficial Youtube client for Roku TV
-- [Clipious](https://github.com/lamarios/clipious): Unofficial Invidious client for Android
+- [Ytfzf](https://github.com/pystardust/ytfzf): A posix script to find and watch youtube videos from the terminal. (Without API).
+- [Playlet](https://github.com/iBicha/playlet): Unofficial Youtube client for Roku TV.
+- [Clipious](https://github.com/lamarios/clipious): Unofficial Invidious client for Android.
## Liability
diff --git a/assets/js/watch.js b/assets/js/watch.js
index cff84e4d..36506abd 100644
--- a/assets/js/watch.js
+++ b/assets/js/watch.js
@@ -282,7 +282,7 @@ function get_youtube_replies(target, load_more, load_replies) {
if (load_more) {
body = body.parentNode.parentNode;
body.removeChild(body.lastElementChild);
- body.innerHTML += response.contentHtml;
+ body.insertAdjacentHTML('beforeend', response.contentHtml);
} else {
body.removeChild(body.lastElementChild);
diff --git a/src/invidious/yt_backend/connection_pool.cr b/src/invidious/yt_backend/connection_pool.cr
index 46e5bf85..b4c1878c 100644
--- a/src/invidious/yt_backend/connection_pool.cr
+++ b/src/invidious/yt_backend/connection_pool.cr
@@ -8,8 +8,9 @@
def add_yt_headers(request)
if request.headers["User-Agent"] == "Crystal"
- request.headers["User-Agent"] ||= "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
+ request.headers["User-Agent"] ||= "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
end
+
request.headers["Accept-Charset"] ||= "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
request.headers["Accept"] ||= "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
request.headers["Accept-Language"] ||= "en-us,en;q=0.5"
diff --git a/src/invidious/yt_backend/youtube_api.cr b/src/invidious/yt_backend/youtube_api.cr
index 91a9332c..3dd9e9d8 100644
--- a/src/invidious/yt_backend/youtube_api.cr
+++ b/src/invidious/yt_backend/youtube_api.cr
@@ -7,16 +7,18 @@ module YoutubeAPI
private DEFAULT_API_KEY = "AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"
- private ANDROID_APP_VERSION = "17.33.42"
+ private ANDROID_APP_VERSION = "18.20.38"
# github.com/TeamNewPipe/NewPipeExtractor/blob/943b7c033bb9d07ead63ddab4441c287653e4384/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java#L1308
- private ANDROID_USER_AGENT = "com.google.android.youtube/17.33.42 (Linux; U; Android 12; US) gzip"
+ private ANDROID_USER_AGENT = "com.google.android.youtube/18.20.38 (Linux; U; Android 12; US) gzip"
private ANDROID_SDK_VERSION = 31_i64
private ANDROID_VERSION = "12"
- private IOS_APP_VERSION = "17.33.2"
+
+ private IOS_APP_VERSION = "18.21.3"
# github.com/TeamNewPipe/NewPipeExtractor/blob/943b7c033bb9d07ead63ddab4441c287653e4384/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java#L1330
- private IOS_USER_AGENT = "com.google.ios.youtube/17.33.2 (iPhone14,5; U; CPU iOS 15_6 like Mac OS X;)"
+ private IOS_USER_AGENT = "com.google.ios.youtube/18.21.3 (iPhone14,5; U; CPU iOS 15_6 like Mac OS X;)"
# github.com/TeamNewPipe/NewPipeExtractor/blob/943b7c033bb9d07ead63ddab4441c287653e4384/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java#L1224
- private IOS_VERSION = "15.6.0.19G71"
+ private IOS_VERSION = "15.6.0.19G71"
+
private WINDOWS_VERSION = "10.0"
# Enumerate used to select one of the clients supported by the API
@@ -43,7 +45,7 @@ module YoutubeAPI
ClientType::Web => {
name: "WEB",
name_proto: "1",
- version: "2.20221118.01.00",
+ version: "2.20230602.01.00",
api_key: DEFAULT_API_KEY,
screen: "WATCH_FULL_SCREEN",
os_name: "Windows",
@@ -63,7 +65,7 @@ module YoutubeAPI
ClientType::WebMobile => {
name: "MWEB",
name_proto: "2",
- version: "2.20220805.01.00",
+ version: "2.20230531.05.00",
api_key: DEFAULT_API_KEY,
os_name: "Android",
os_version: ANDROID_VERSION,