MShawon / YouTube-Viewer

A multithreaded view bot for YouTube
MIT License
1.47k stars 749 forks source link

I think youtube detect the bot #46

Closed egbrave closed 3 years ago

egbrave commented 3 years ago

Hi I start using the bot five days ago first day I get 195 hours third day I get 770 hours forth I get 90 hours last day I get 509 hours but all these hours losted today what's wrong

MShawon commented 3 years ago

@cyruskalx thanks a lot man for your information... I will try to implement docker

cyruskalx commented 3 years ago

@cyruskalx thanks a lot man for your information... I will try to implement docker

I stubbled across this and tried it out. The views don't stay, as its using TOR proxies, I believe YT just out right refuses them. But if you can get it installed and run it, then you should have a good idea how to implement it.

https://github.com/soumyadityac/youtube-viewer

And I believe Docker can be server based, so if you get a bot that is working 100% with no view drops, you can subscribe to run it online or something. I think, didn't look much into it.

MShawon commented 3 years ago

Yeah I made some tests with tor proxies every single views were deleted.

psyabit commented 3 years ago

Yes.

https://www.webshare.io/?referral_code=v1uk5ilkv2kb

U can use this code?

Von meinem iPhone gesendet

Am 25.03.2021 um 15:13 schrieb chefo66 @.***>:

 webshare.io

Do you use the rotating proxy from webshare.io?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

idmahbub commented 3 years ago

combinations

@MShawon @idmahbub There is one way you can get around not using headless mode, and technically be in headless mode.

One way is to have Virtual Machines, as you can launch a browser in it and have the VM minimize, but that is very resource heavy as you are trying to run multiple computers at once. It works, but can't run many threads or Computers in this case.

Are you familiar with Docker? Docker does the same thing as a VM, but is completely headless, and light on resources.

VM - Needs to have its own operating system, storage, and memory. Which gets reserved from your main computer, since you are using a GUI it requires more memory.

Docker - Used containers. So think of each container as its own person VM. But it just uses your already installed operating system, and has no GUI, requires very little storage. Therefore requires very little resources.

Instead of running a Thread in your script, the containers are its own indiviual Thread. So you just tell Docker how many containers you want to run, and it will run X amount. Which means each container is basically its own VM, of the same script. And its completely headless when running (no GUI).

For example if I ran the script.... with just one thread on my computer, it would open a browser not in headless mode, and I could see it work through the script. Now take that, and put it into Docker. Now its doing the same thing, but is basically on a headless VM. YT cant detect it, because the browser running in the container is not headless, but its headless to you.

If Im confusing you, I'm sorry. Docker took a bit to wrap my head around too. but its a game changer and easy to implement.

If you have a script, I can help you convert it into a Docker image. Nothing has to change with your script, you just have to write a Dockerfile that indicates what the image needs to run your script. For example what pip modules you need, files to add, etc.

thanks for your idea, yes I am familiar and often use it, but only for system deployments. my question:

  1. Is it still using headless = false in the selenium driver?
  2. What operating systems might be used, especially to save resources?
idmahbub commented 3 years ago

@cyruskalx thanks a lot man for your information... I will try to implement docker

I stubbled across this and tried it out. The views don't stay, as its using TOR proxies, I believe YT just out right refuses them. But if you can get it installed and run it, then you should have a good idea how to implement it.

https://github.com/soumyadityac/youtube-viewer

And I believe Docker can be server based, so if you get a bot that is working 100% with no view drops, you can subscribe to run it online or something. I think, didn't look much into it.

well I understand this, then can using a virtual desktop (windows) be a solution?

chefo66 commented 3 years ago

Yes. https://www.webshare.io/?referral_code=v1uk5ilkv2kb U can use this code? Von meinem iPhone gesendet Am 25.03.2021 um 15:13 schrieb chefo66 @.***>:  webshare.io Do you use the rotating proxy from webshare.io? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

But there you have always the same IP's, right?

psyabit commented 3 years ago

No. I use 100 proxys with weekli rotation and 2 threads. I have around 20 youtube vids atm.

Von meinem iPhone gesendet

Am 25.03.2021 um 16:09 schrieb chefo66 @.***>:

 Yes. https://www.webshare.io/?referral_code=v1uk5ilkv2kb U can use this code? Von meinem iPhone gesendet … Am 25.03.2021 um 15:13 schrieb chefo66 @.***>:  webshare.io Do you use the rotating proxy from webshare.io? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

But there you have always the same IP's, right?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

chefo66 commented 3 years ago

No. I use 100 proxys with weekli rotation and 2 threads. I have around 20 youtube vids atm. Von meinem iPhone gesendet

So every week you get 100 new IP's . I'm testing currently stormproxies also with 2 or 3 threads, but it seems today YT deleted all bot views from yesterday. Maybe the problem is that I only tried with one video, because I want to see whether everything works well. Is it possible that YT also delete on or two weeks later? Then it's hard to see what happens...

idmahbub commented 3 years ago

@cyruskalx Can you create and share a docker file to run this script? do you have a discord? this my discrod id idmahbub#5700

chefo66 commented 3 years ago

Hey, it's simple to buy YT views from a provider. And for sure they are stable and will be not removed from YT. The only thing you have to provide is the URL of the video, so they don't use any search function (I tested such service already). I don't know how they do it, but in my opinion the main key point is the quality of the proxies which they are using or maybe they use VPN, I really don't know.

This script is running very well (don't know whether docker will improve) and it seems if I use German / European proxy it seems the views will be not deleted. Made somebody here the same experience? Using Asien proxy the view will be deleted very quick. But also for me often proxies in USA not stable. So maybe YT verify the Channel location and view location!

Made somebody here the same experience?

So guys use the script with good proxy and you will be happy.

idmahbub commented 3 years ago

@cyruskalx Can you create and share a docker file to run this script? do you have a discord? this my discrod id idmahbub#5700

im sorry, this is a great idea, https://github.com/zalando/zalenium/ (selenium grid). but must more resource requirement, i tried to deploly in my kubernetes, and using https://github.com/jenkinsci/docker for put python job for view video. 1container = 1 browser = 1vcpu/1gbram = 1 rotated proxy = i hope this is a HQ view 👯 let's see the results later ☕

robinroot commented 3 years ago

let me share my experience here, before that I thank this coder. i have read some articles on blackhat world about selenium bot. some modern websites have a detection of a bot, many of which they use to detect bot activity. One of them is if selenium is running in headless mode, and are you aware that the chromedriver has a flag to say "HEY I am an automatic driver"? I've found the problem of removing FLAG on the chromedriver. ok so the points are:

  1. Do not run selenium in headless mode
  2. Try to remove the FLAG on the chromedriver
  3. and I added the following option, options.add_argument ("--disable-blink-features = AutomationControlled")

reference: https://www.blackhatworld.com/seo/python-how-to-make-webdriver-with-selenium-undetectable.1208678/ https://stackoverflow.com/questions/53039551/selenium-webdrivermodifying-navigator-webdriver-flag-to-prevent-selenium-detec https://stackoverflow.com/questions/33225947/can-a-website-detect-when-you-are-using-selenium-with-chromedriver (remove Chromedriver flag)

hope this helps you

robinroot commented 3 years ago

I think the best way to keep YouTube from detecting bot activity is not to go directly to the video url. make a flow as humans open YouTube then type in the search field then click the video you want to watch.

I hope you can change the code in the search section the first exception points to the address youtube.com, then the second exception points to m.youtube.com where it requires a special mobile user agent at the address m.youtube.com

MShawon commented 3 years ago

@robinroot I will think about search method.. but m.youtube.com won't be a good idea because platform can be detected so from windows browsing m.youtube.com with mobile user agent will give away as bot

MShawon commented 3 years ago

@robinroot I tried the search method but your browser is not supported pop-ups every time when I direct go to youtube dot com with proxies.

vasiliy1708 commented 3 years ago

use youtube_viewer_premium.exe show red line "Line : 198 | Cannot choose from an empty sequence" then closes how to fix?

vasiliy1708 commented 3 years ago

https://ibb.co/QQH8bxS

MShawon commented 3 years ago

@vasiliy1708 make sure your search.txt and urls.txt is not empty. If you have further questions please open a new issue.

Utrak412 commented 3 years ago

Hi I have problem Tried 2 | Line : 306 | Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Does anyone know how to fix it?

MShawon commented 3 years ago

@Utrak412 open a new issue.. don't post problem here