youtube: fighting fire^Wsuck with suck - frontends - front-ends for some sites (experiment) (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit e6d1e569ab9d78378e0d05c1b2232c010c007911 (DIR) parent c9c84fd026fb2c41b2dbdde68e9c9bd0535251b7 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 18 Jun 2020 15:19:33 +0200 youtube: fighting fire^Wsuck with suck When specifying no user-agent and the now deprecated disable_polymer parameter it would still try to serve the new layout sometimes. Use Google it's own bot user-agent to force switching the old layout which uses the non-polymer layout. Hopefully this is more "reliable". Diffstat: M youtube/youtube.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- (DIR) diff --git a/youtube/youtube.c b/youtube/youtube.c @@ -34,7 +34,8 @@ static size_t nvideos; static char * youtube_request(const char *path) { - return request("www.youtube.com", path, ""); + return request("www.youtube.com", path, + "User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)\r\n"); } static int