Giter Site home page Giter Site logo

hatscripts / youtube-auto-liker Goto Github PK

View Code? Open in Web Editor NEW
70.0 6.0 15.0 86 KB

A userscript that automatically likes ๐Ÿ‘ each video you watch on YouTube โ–ถ๏ธ

JavaScript 100.00%
userscript youtube like video autoliker automation

youtube-auto-liker's People

Contributors

bleakbluets avatar hatscripts avatar jesperdramsch avatar kas-cor avatar uiojaafdosijfafdssf avatar wisnoskij avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

youtube-auto-liker's Issues

Stopped working again

Since yesterday (May 21st, 2021), the script doesn't auto like, but the bar under the thumbs up lights up as if it was liked.

image

Stopped working Again

YouTube Auto-Liker: Failed to like video: Error: Couldn't find sub button. Will try again in 5000 ms...

If you activate the option Like if not subscribed Works

Only works after page reload

Sometime in early 2018, Youtube change something in their code. Using Tampermonkey, the YouTubeAutoLiker script will load after refreshing the page. See this issue on both Firefox and Chrome. Also see feedback on Greasy Fork as other people are see same issue.

Script can't detect being subscribed anymore.

This started today.

If I set "LIKE_IF_NOT_SUBSCRIBED" to true, then it works and likes the video. When it's false, as I normally use it, it doesn't like videos from channels I'm subbed to anymore.

Windows 10 latest
Chrome Beta Version 90.0.4430.61 (Official Build) beta (64-bit)
Tampermonkey 4.12

Stopped working

I use it on Tampermonkey 4.16.1 over Chrome 105.0.5195.125 running macos Monterey 12.6. Videos run to the end and no auto liking is done.

Not working again

Not sure why but it is not working for me both in edge and chrome even with version 1.3.26

No videos are being liked

Script cannot use the player API from YouTube

The script didn't work for me, so I tried debugging it. Turns out it was the watchThresholdReached () function that was failing and in particular because of the calls player.getCurrentTime() and player.getDuration() - both of these properties turned out to be undefined, so the script fails because it tries to execute undefined as a function.

I'm not sure what the problem is, though. According to this SO answer the function shouldn't be available. However, that's from 2013 and maybe things changed. I've only started using the script about a week ago and then only now noticed it didn't work. So, not sure if it has worked before or not.

My solution was a bit of a hack - I surrounded the check in a try/catch:

function watchThresholdReached() {
  let player = document.querySelector(SELECTORS.PLAYER)
  try {
    if (player) {
      return player.getCurrentTime() / player.getDuration() >= OPTIONS.WATCH_THRESHOLD
    }
  } catch (e) {}

  return true
}

It now works because it just defaults to true if there is an error just like it defaults to true if it doesn't find the player. However, I'm not sure this is really a good solution.

I'm using GreaseMonkey in Firefox 73.0.1 (64-bit) on Windows 10 to run the userscript, so I don't know if GM itself has more restrictions than alternatives or something else in my setup. It's possible that YouTube did something somewhat recently to make the player API not available again.

button id has changed (including fix)

Seems youtube has changed the id of the like button. At least this script didn't work for me.

How to fix it?
Simply change the selector in row 96 to
LIKE_BUTTON: '#top-level-buttons-computed > ytd-toggle-button-renderer:nth-child(1) > a > yt-icon-button',

script didn't update.

I was going to make a pull request with the new subscribe button, but then I saw you updated. Tampermonkey didn't update the script I installed via greasyfork however.
I think it was probably because you didn't update the version number?

I now updated manually. But maybe update the version number to 1.3.1?

Doesn't work anymore :(

Hi guys :)
Since 3/4 days the script stopped working :( My chrome version is 121.0.6167.57. Do u have the same problem or it's just me?

THANK YOU!

First of all: Thank you for this absolutely AMAZING script. I do not have the skills required to code anything like this, and it runs smoothly. You are AWESOME!

Auto-likes video even after I dislike

Just made a pull request! #20

Whenever I dislike a video before the progress bar percentage for the "Watch Threshold" setting is reached, it likes the video it has been reached.
You can reproduce this by setting the watch threshold to something above 0, disliking the video, then going past the progress percentage you entered.
I don't know how to fix this because I don't know any JavaScript or HTML. But I do know why it's happening, it's because you don't have the dislike button in the "SELECTORS" constant thing. If you didn't add this for a reason, go ahead and close this issue.

[Bug] When "Watch Later" list is open this script will press the loop button on that instead

Using the script as is causes the "Loop Playlist" button to be pressed rather than the like button, changing the line
LIKE_BUTTON: '#top-level-buttons > ytd-toggle-button-renderer:nth-child(1), .like-button-renderer-like-button:not(.hid)',
to
LIKE_BUTTON: 'ytd-video-primary-info-renderer #top-level-buttons > ytd-toggle-button-renderer:nth-child(1), .like-button-renderer-like-button:not(.hid)',

fixes this issue

P.S Thank you for making this script, I have been looking for a working auto-like script for ages.

Broken?

Unless my installation just corrupted randomly, this script just stopped working with whatever update YT pushed.

Chrome-Tampermonkey

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.