MShawon / YouTube-Viewer

A multithreaded view bot for YouTube
MIT License
1.5k stars 760 forks source link

100% WORKING SOLUTION !!! #588

Open Znotrovitsk opened 1 year ago

Znotrovitsk commented 1 year ago

Is there an existing issue for this?

I'm submitting a ...

Description

Hello Beloved Friends! finally i found a solution for drop views issues the overall problem is with google chrome user agent i start using firefox user agent and is working (same using chrome browser the problem is only chrome user agent) 100% no drop for me

Thats all good people i hope this can help.

:)

Environment

- OS : 
- Python : 
- Script version :

config.json

:)
stark1ng commented 1 year ago

ho to replace chrome to firefox?

Znotrovitsk commented 1 year ago

@stark1ng i used an extension for user agent switcher i still using google chrome the problem is not the browser but the user agent, i dont know why this happens but work for me

MShawon commented 1 year ago

@Znotrovitsk which extension you used? Did you put it in the custom extension folder? Share your settings so that other people can test and confirm from their ends too.

And for how many days your views are staying?

Znotrovitsk commented 1 year ago

Hi @MShawon now i'm traveling but i used this extension: https://chrome.google.com/webstore/detail/random-user-agent-switche/einpaelgookohagofgnnkcfjbkkgepnp

I Have tested with 500 views 6 days ago, and the views still stayed there.

Before run need to open the browser after click in the extension and click in the firefox icon for just generate firefox user agents. After that need to open the extension config and uncheck the box ´´Automatically change the User-Agent after especified period of time´´, save and well done!

A little complex but worked for me.

anything contact me

thx

taran0026 commented 1 year ago

@Znotrovitsk Which proxies are you using for this and how many?

Znotrovitsk commented 1 year ago

Hi @taran0026 I'm using 1000 IPV6/HTTPS proxy from https://proxy-seller.com

Make sure for only use good proxy dont public or tor proxyes

If you will choose a plan use this promo code for earn discount and support me: ZTWKST_633912

Thx

taran0026 commented 1 year ago

@Znotrovitsk Thanks for the info. I'd say let's wait for some more time as I have read youtube can delete views upto two weeks after. Let's hope the views stick. Keep us updated!

And can you explain this in detail please? "Before run need to open the browser after click in the extension and click in the firefox icon for just generate firefox user agents. After that need to open the extension config and uncheck the box ´´Automatically change the User-Agent after especified period of time´´, save and well done!"

kattstof commented 1 year ago

@MShawon :

after reading the /src and trying to make sense of alot of it (Readability counts!)

the chromedriver isn't properly switching user-agents between instances and is what's causing it to be detected (you should explicitly set it from a list of useragents instead of using from fake_headers import Headers, browsers)

what you need to do is everytime a chromedriver is open change the header user-agent

Specificly (atleast i think this would be the code to change)

header = Headers( browser="chrome", os=os.name, headers=False ).generate() agent = header['User-Agent']

should be more like this:

put list of user agents in header (in this example i use 2)

header = ["Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.0.10) Gecko/2009042513 Linux Mint/5 (Elyssa) Firefox/3.0.10", "Opera/12.0(Windows NT 5.1;U;en)Presto/22.9.168 Version/12.00"]

choose random

user_agent = random.choice(header)

set explicitly

headers = {"user-agent": user_agent}

this still doesn't fix the 404 error when trying to use newer version of chrome so until that's fixed you would have to use a downgraded version

again i've only done a minor look at your code so i'm not sure if its a fault in the fake_headers package or if your code just isn't properly setting the user-agent using fake_headers

cheers! and if you need any more help i can take a deeper look

stark1ng commented 1 year ago

@MShawon :

after reading the /src and trying to make sense of alot of it (Readability counts!)

the chromedriver isn't properly switching user-agents between instances and is what's causing it to be detected (you should explicitly set it from a list of useragents instead of using from fake_headers import Headers, browsers)

what you need to do is everytime a chromedriver is open change the header user-agent

Specificly (atleast i think this would be the code to change)

header = Headers( browser="chrome", os=os.name, headers=False ).generate() agent = header['User-Agent']

should be more like this: #put list of user agents in header (in this example i use 2) header = ["Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.0.10) Gecko/2009042513 Linux Mint/5 (Elyssa) Firefox/3.0.10", "Opera/12.0(Windows NT 5.1;U;en)Presto/22.9.168 Version/12.00"] #choose random user_agent = random.choice(header) #set explicitly headers = {"user-agent": user_agent}

this still doesn't fix the 404 error when trying to use newer version of chrome so until that's fixed you would have to use a downgraded version

again i've only done a minor look at your code so i'm not sure if its a fault in the fake_headers package or if your code just isn't properly setting the user-agent using fake_headers

cheers! and if you need any more help i can take a deeper look

Thanks for you app. The best solution to work is Chrome Version 114.0.5735.199. difficult to find for linux this version.

stark1ng commented 1 year ago

My solution! Works nice. Testing on Windows 10,11, Linux Mint, Arch Install everything for python3, windows users the same and c++ v14 or greater from visual studio https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019

then install latest chrome 116. ..... for linux users please install from aur=arch linux or from official website for Debian based distros. please do not install from flathub. Make chrome default browser then download chromedriver (https://chromedriver.chromium.org/downloads/version-selection) for chrome 116 use this link https://googlechromelabs.github.io/chrome-for-testing/ select your chromedriver version for linux use this: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/linux64/chromedriver-linux64.zip exctract chromedriver file to youtube-vewer folder run!

taran0026 commented 1 year ago

@stark1ng How long have the views stayed?

sssaaalah102 commented 1 year ago

hello i test mozilla with defrante user agent and http proxy and with https ipv6 proxy not work for me aftre 48 h views delate

sssaaalah102 commented 1 year ago

@stark1ng @MShawon @taran0026 all time youtube delate my views i test all chrome version i test Mozilla i test all proxy ... same problem

and i need boot for auto upload short video if possible

sssaaalah102 commented 1 year ago

and in this bot chromedriver 115 https://github.com/PatrickAcheson/automate_youtube_shorts

taran0026 commented 1 year ago

@sssaaalah102 Did you try @Znotrovitsk 's solution?

kattstof commented 1 year ago

changed the code on my local version to explicitly set the user-agent from a list of 4k+ random user agents

some of the views stay some of them get deleted

which tells me that youtube is flagging some user-agents as problematic or potential bots and others are not flagged at all

Bing did the same thing a few years ago that broke a few of my personal automated scripts ... the only solution was to up the amount of user-agents it pulls from and figure out which ones were flagged

or you could just let it auto-delete the flagged ones while keeping the ones that aren't flagged

either-way i ended up using this script as a base for my own script but using selenium + Firefox and randomly changing user-agent and haven't had 1 view delete when using chrome some get deleted some don't -- which again, means some user-agents are being flagged as potential bots while others are flagged as 'fine' and 'legitimate'

as far as the above claim of using an addon to change the user agent -- that actually won't work as selenium uses options to set addons and without setting the addon in the options like so: chrome_options = Options() chrome_options.add_extension('path_to_extension') the addon wont be loaded by selenium

sssaaalah102 commented 1 year ago

@kattstof how can add list of user agent in script !!

sssaaalah102 commented 1 year ago

Is there a solution ???? @kattstof @MShawon @stark1ng @taran0026 @Znotrovitsk

Znotrovitsk commented 1 year ago

@sssaaalah102 what has working good now is using Selenium + Firefox. We need wait for a new update by @MShawon

Znotrovitsk commented 1 year ago

@kattstof If it's not a problem for you try to talk with mshawon explaining what the code needs to work properly

thx for your help!

taran0026 commented 1 year ago

@Znotrovitsk Are you using the same method that you mentioned above? And have the views stayed till now(the ones that you mentioned above)?

Znotrovitsk commented 1 year ago

@taran0026 Worked well, all the views stayed. But we need a new script because this extension always start in default mode for each instance and in the default mode the user agent change automatically after 600s (10min) in this extension, this means for videos bigger than 10min if the instance dont close before 10min the user agent will change automatically when the video still playing, and youtube will delete the view. We need only fix the script for change user agent correct in each instance without this extension.

This will fix the problem, but the ideal thing is replace the script for running with firefox it's will work for a long time with firefox without problems!

Znotrovitsk commented 1 year ago

After that we need a big list with recent user agent i think they are more “ reliable “ by youtube.

taran0026 commented 1 year ago

Does the extension work in every new instane?

Znotrovitsk commented 1 year ago

@taran0026 yes

taran0026 commented 1 year ago

Do we need to buy the user agents or something like that?

Znotrovitsk commented 1 year ago

idk, with the extension work perfectly and the extension used free list

Znotrovitsk commented 1 year ago

The ideal is fix the script i will wait for mshawon new update.

Znotrovitsk commented 1 year ago

How i said above the perfect world here is replace all in firefox.

taran0026 commented 1 year ago

User agents are strings, text defining the browser, version, device... I think that can be found easily.

taran0026 commented 1 year ago

Yes, if Firefox views stay and has no problem then it is the way to go

Znotrovitsk commented 1 year ago

Yes, this is the way! we can't be dependent 1 extension and in the future chrome will update again and we will face problems.

Firefox way we need. xd

JijaProGamer commented 1 year ago

@stark1ng @MShawon @taran0026 all time youtube delate my views i test all chrome version i test Mozilla i test all proxy ... same problem

and i need boot for auto upload short video if possible

If you want a API (written in nodejs) to upload videos you can use https://github.com/JijaProGamer/youtube-selfbot-api, you can also use it to make comments, watch videos, login into accounts, etc.

ssutee commented 1 year ago

@taran0026 Worked well, all the views stayed. But we need a new script because this extension always start in default mode for each instance and in the default mode the user agent change automatically after 600s (10min) in this extension, this means for videos bigger than 10min if the instance dont close before 10min the user agent will change automatically when the video still playing, and youtube will delete the view. We need only fix the script for change user agent correct in each instance without this extension.

This will fix the problem, but the ideal thing is replace the script for running with firefox it's will work for a long time with firefox without problems!

@Znotrovitsk

I modified the extension to disable the user agent change automatically by default and change the default user agent to Firefox. You can build the extension from this source code. https://github.com/ssutee/random-user-agent

eugenee93 commented 1 year ago

@taran0026 Worked well, all the views stayed. But we need a new script because this extension always start in default mode for each instance and in the default mode the user agent change automatically after 600s (10min) in this extension, this means for videos bigger than 10min if the instance dont close before 10min the user agent will change automatically when the video still playing, and youtube will delete the view. We need only fix the script for change user agent correct in each instance without this extension. This will fix the problem, but the ideal thing is replace the script for running with firefox it's will work for a long time with firefox without problems!

@Znotrovitsk

I modified the extension to disable the user agent change automatically by default and change the default user agent to Firefox. You can build the extension from this source code. https://github.com/ssutee/random-user-agent

Is there a way you get with @MShawon in touch so we can download a newer version with your changes?

AeroMonkie commented 1 year ago

Did your 500 views stay? They still haven't been deleted?

Znotrovitsk commented 1 year ago

@AeroMonkie All 500 views stayed, no drops. I used Firefox User Agent!

taran0026 commented 1 year ago

@Znotrovitsk You got discord?

mercuryin commented 1 year ago

@taran0026 Worked well, all the views stayed. But we need a new script because this extension always start in default mode for each instance and in the default mode the user agent change automatically after 600s (10min) in this extension, this means for videos bigger than 10min if the instance dont close before 10min the user agent will change automatically when the video still playing, and youtube will delete the view. We need only fix the script for change user agent correct in each instance without this extension. This will fix the problem, but the ideal thing is replace the script for running with firefox it's will work for a long time with firefox without problems!

@Znotrovitsk

I modified the extension to disable the user agent change automatically by default and change the default user agent to Firefox. You can build the extension from this source code. https://github.com/ssutee/random-user-agent

I have installed the extension but I don't know how to make the settings persistent for all chrome instances, do you have any file already modified I can use or can you point me in the right direction if you don't mind ? thanks ! I want to try if with this extension the views are not dropping.

MShawon commented 1 year ago

if anyone wants to test this extension with Firefox agents put this zip file in the extension/custom_extension folder random_ua_generator.zip

mercuryin commented 1 year ago

if anyone wants to test this extension with Firefox agents put this zip file in the extension/custom_extension folder random_ua_generator.zip

Thank you so much, let's see how it goes

taran0026 commented 1 year ago

if anyone wants to test this extension with Firefox agents put this zip file in the extension/custom_extension folder random_ua_generator.zip

Do we still need the extension?

techkick commented 1 year ago

if anyone wants to test this extension with Firefox agents put this zip file in the extension/custom_extension folder random_ua_generator.zip

is it still working for chrome v116? or should we install v114?

eugenee93 commented 1 year ago

if anyone wants to test this extension with Firefox agents put this zip file in the extension/custom_extension folder random_ua_generator.zip

I still got the detected message in my log. Is there a step by step guide what else I need to do to change from chrome to firefox? Got Chrome V112 and use the youtube_viewer exe

taran0026 commented 1 year ago

Yes we need a step by step guide for better clarity. @Znotrovitsk @MShawon can you help?

techkick commented 1 year ago

Yes we need a step by step guide for better clarity. @Znotrovitsk @MShawon can you help?

yes please anyone explain

MShawon commented 1 year ago

Since I did not push the updated code which fixes the latest chromedriver download issue, install earlier Chrome versions from here https://github.com/MShawon/YouTube-Viewer/issues/572 and place the extension in the extension/custom_extension folder

If views stay from my testing with this extension I will push the new code

Percy1082 commented 1 year ago

if anyone wants to test this extension with Firefox agents put this zip file in the extension/custom_extension folder random_ua_generator.zip

is it still working for chrome v116? or should we install v114?

should use v114

Percy1082 commented 1 year ago

Since I did not push the updated code which fixes the latest chromedriver download issue, install earlier Chrome versions from here #572 and place the extension in the extension/custom_extension folder

If views stay from my testing with this extension I will push the new code

idk why use earlier v109 but not v114 ? may be v109 no drop view or somehing else ? @MShawon

taran0026 commented 1 year ago

Since I did not push the updated code which fixes the latest chromedriver download issue, install earlier Chrome versions from here #572 and place the extension in the extension/custom_extension folder If views stay from my testing with this extension I will push the new code

idk why use earlier v109 but not v114 ? may be v109 no drop view or somehing else ? @MShawon

Read #572 first, you'll know