Install Google Chrome and Selenium Application From MShawon Youtube Viewer

Disini bisa paham cara install Google Chrome dan Selenium pada Ubuntu.

Oct 23, 2023 - 08:09
Oct 23, 2023 - 08:15
 0  1.9k

Update & upgrade

sudo apt update

sudo apt -y full-upgrade

reboot

 

Login user in mate desktop then The root Account in ubuntu mate  is disabled by default because his password is not set

sudo -s

sudo passwd root

 

 Install SSH Server

sudo apt-get install openssh-server

 

How to enable ssh root access

sudo nano /etc/ssh/sshd_config

 

change

 

PermitRootLogin prohibit-password

to

PermitRootLogin yes

sudo service ssh restart

sudo systemctl enable ssh

reboot

 # I rebooted system after install

Install Google Chrome

Method 1: Download and install the Google Chrome Debian package

Step 1: Download Google Chrome

  1. Visit the official Google Chrome download page.
  2. Click the "Download Chrome" button.
  3. Choose the "64 bit.deb (for Debian/Ubuntu)" option.
  4. Click "Accept and install".

Save the .deb file to your preferred location, usually the Downloads folder.

Alternatively, you can also download the latest Google Chrome Debian package via the following command:

cd ~/Downloads

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

 

Open a terminal by pressing Ctrl + Alt + T.

Navigate to the location where you saved the.deb file, typically with the command:

cd ~/Downloads

Install the package using the following command:

sudo dpkg -i google-chrome-stable_current_amd64.deb

 

In case you encounter dependency issues, fix them using:

 

sudo apt-get install -f

 

check chrome

google-chrome version

 

Running Google Chrome desktop

If popup keyring enabled you must fix them.

Fix  keyring use 100% CPU usage when Google Chrome started

Login putty by user root, make simple copy to terminal

sed -i 's/Exec=\/usr\/bin\/google-chrome-stable %U$/Exec=\/usr\/bin\/google-chrome-stable %U --password-store=basic/g' /usr/share/applications/google-chrome.desktop

sed -i 's/Exec=\/usr\/bin\/google-chrome-stable$/Exec=\/usr\/bin\/google-chrome-stable --password-store=basic/g' /usr/share/applications/google-chrome.desktop

 

Running google chrome by ubuntu mate desktop again

INSTALL YouTube-Viewer DEFAULT by mshawon

Support Python 3.7.x - 3.10.12

Login putty by user

To list all python versions in default locations

ls /usr/bin/python*

 

 

Install git

sudo apt install git

 

install pip

sudo apt install pip

 

cd /tmp

git clone https://github.com/MShawon/YouTube-Viewer.git --depth 10

cd YouTube-Viewer

python3 -m pip install --upgrade pip wheel

pip3 install "setuptools<59"

pip3 install -r requirements.txt

cd ..

sudo mv YouTube-Viewer/ /usr/local/.

cd /usr/local/YouTube-Viewer

 

If you've got a large free proxies collection, you should run this command to filter Good proxies. Then use GoodProxy.txt for proxy in youtube_viewer.py

Urls

Put video links in the urls.txt. For multiple videos place urls in multple lines.

To find video link in YouTube click share and copy.

 If you have any external link which will redirect to your youtube video you can use that too. Example : when you post a YouTube video link in twitter and you hit play on twitter, you will get a link like this https://t.co/xxxxxxxxxx?amp=1. This is helpful because YouTube will see that views are coming from External Source like twitter in this example.

 

Search

Program can search youtube with the keyword you want and find the video with video title or video id. To do this you need to know what keyword can find your video on youtube search engine. Also you need to provide exact video title or video id. Put keyword and title like this format keyword :::: video title or keyword :::: video id in search.txt. Always use multiple keyword for the same video title or video id.

If you don't know any keyword just put your video title :::: video title or video title :::: video id in search.txt

Usage

  • Open command prompt in YouTube-Viewer folder and run

python3 youtube_viewer.py

FIX Run chromedrvier 115 got error "chromedriver' executable -> sessionnotcreatedexception

check chrome

google-chrome version

 

if google chrome version 118 you must have chromedriver = 118

 then download chromedriver, minimal same version with your chrome

https://googlechromelabs.github.io/chrome-for-testing/#stable

extract and upload to main dir/work dir

by winscp set directory permission with current user set 0777

 

 

sudo chmod +x /usr/local/botweb/chromedriver

 

run your program again

  • Open command prompt in YouTube-Viewer folder and run

python3 youtube_viewer.py

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow