GithubHelp home page GithubHelp logo

soerenpriess / youtube-viewer Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 5.0 5.92 MB

A youtube viewer that accesses via proxies, controls resources and logs the data

Python 100.00%
youtube-viewer python python3 youtube-view-bot excel youtube proxy proxy-server xlsx ressources

youtube-viewer's Introduction

Youtube-Viewer

!!! This program is not 100% complete yet and may contain errors!!!

A youtube viewer, which connects to freely available proxy servers beforehand. The proxies are obtained from the following URL 'https://free-proxy-list.net/'.

The program goes through several iterations, with one iteration calling a video 30-40 times. After each iteration, the program looks for a new proxy server through which it can call up the video. After each video call, it is checked whether more than 15% CPU and memory are available and only then does the next window open. This is to control the resources used. (The limit values (can be adjusted in line 31). Optionally, it can be set that after the iterations have been run through, an entry is made in the Excel file "test.xlss", which includes the duration of the program, the video calls, the video URL, etc.

Features

  • access via proxy
  • resource control
  • documentation in xlsx

Setup

Install requirements

pip install -r requirements.txt

Chrome driver is also required: https://chromedriver.chromium.org

viewer.py

In Line 12 can be set if the data should be saved in the Excel file.

useXlxs = False

Start Program

python viewer.py

After you started the programm you will be asked for the Url, number of iterations, search for specific country, kill time for the videos and the current views. Set your params here. If you want to search for a specific country you will be asked for the country code here. Set here for example "GB" if you only want Proxies from Great Britain or "US" for United States and so on.

You can find a list of all codes here under Alpha-2-code : https://www.iban.com/country-codes

The number of the iteration is between 30-40, because it can happen that a proxy is used several times and thus attempts are made to imitate user behavior.

"URL:"
"Iterations (1 Iteration = 30-40 Tabs):"
"Do you want to search for proxies in a specific country? (y/n):"
"Kill-Time:"
"Current-Views:"

Now it will search for proxies until it finds a working one.

Start Iteration 0
Proxy    103.234.98.140:8888    doesnt work
Proxy    209.141.55.228:80    doesnt work
Proxy    161.35.4.201:80    doesnt work
Proxy    103.214.109.69:80    doesnt work
Proxy    47.243.135.104:8080    doesnt work
Proxy    163.116.136.116:8081    doesnt work
Proxy    167.114.96.27:9300    work                <-- use this

It will check your memory and cpu and if more than 15% are available a step will be processed. If not it will wait until space is available.

Free Memory: 37.33941134252943%
Free Cpu: 97.0%
Step 1 from 38 | Iteration: 1 from 1
Free Memory: 35.60870452165333%
Free Cpu: 92.5%
Step 2 from 38 | Iteration: 1 from 1
Free Memory: 35.126594765932%
Free Cpu: 89.7%
Step 3 from 38 | Iteration: 1 from 1
...

After all tabs have been opened, it waits until the previously entered time expires (killTime) and then all windows are closed again.

Updates

v1.0 = initialisation

v1.1 = country code filter

  • last Update: 05.02.2022 - DD.MM.YYYY

youtube-viewer's People

Contributors

soerenpriess avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

youtube-viewer's Issues

proxy

The user would import proxy list

IndexError

When I put the number of views this error appears

Traceback (most recent call last):
File "/root/Youtube-Viewer/viewer.py", line 216, in
main()
File "/root/Youtube-Viewer/viewer.py", line 204, in main
work = testProxies(getProxyList(countryCode)) # stores working proxies
File "/root/Youtube-Viewer/viewer.py", line 160, in getProxyList
data = [list(filter(None, i))[0] for i in re.findall('(.?)|(.?)', source)]
File "/root/Youtube-Viewer/viewer.py", line 160, in
data = [list(filter(None, i))[0] for i in re.findall('(.?)|(.?)', source)]
IndexError: list index out of range

ERR

Getting the error below when trying to use, doesn't matter what I do.

Traceback (most recent call last):
File "c:\Users\Admin\Downloads\Youtube-Viewer-main\Youtube-Viewer-main\viewer.py", line 216, in
main()
File "c:\Users\Admin\Downloads\Youtube-Viewer-main\Youtube-Viewer-main\viewer.py", line 204, in main
work = testProxies(getProxyList(countryCode)) # stores working proxies
File "c:\Users\Admin\Downloads\Youtube-Viewer-main\Youtube-Viewer-main\viewer.py", line 160, in getProxyList
data = [list(filter(None, i))[0] for i in re.findall('(.?)|(.?)', source)]
File "c:\Users\Admin\Downloads\Youtube-Viewer-main\Youtube-Viewer-main\viewer.py", line 160, in
data = [list(filter(None, i))[0] for i in re.findall('(.?)|(.?)', source)]
IndexError: list index out of range

[FR] Filter proxy list to specific country?

Heya. I know this is early, but figured I'd put in a request. I see that the code pulls all the IPs from the free-proxy-list. On that site you have all the regions listed for the IPs. Could you please add a function in your script to target specific region of proxy? (e.g. United States) Useful for smaller Youtube channels to only be receiving views from their own country as a start.

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.