Giter Site home page Giter Site logo

bayodev / twitch-best-of Goto Github PK

View Code? Open in Web Editor NEW
30.0 2.0 3.0 948 KB

Automatically create a best-of video of a channel/category clips without a token.

License: GNU General Public License v3.0

Python 100.00%
twitch clips video bestof video-generator twitch-clips no-token selenium twitch-streamers best-of

twitch-best-of's Introduction

Twitch-Best-Of-Gen

GitHub GitHub top language GitHub issues

This program create a video scraping the best clips of a channel or category ready to be posted without using a token!

Download repository

Content:

  1. Installation
  2. Usage
  3. Customization
  4. ⚠️DISCLAIMER⚠️
  5. CREDITS

Installation

0. Make sure to have chrome installed and a compatible webdriver installed and added to PATH, a guide can be found here


1. Clone the directory

git clone https://github.com/BayoDev/Twitch-Best-Of-Gen.git

Or

Download repository

2. Unzip the file if compressed

3. Install requirements

cd Twitch-Best-Of-main

If installed via git the name of the folder may vary

pip install -r requirements.txt

Usage

You must be in the directory to run the program!

python main.py

Follow the steps of the program to create your video!

Customize

You can customize some part of the video by modifying the config.ini file in the /res folder

The file is created the first time that you run the program

OUTPUT DESCRIPTION
title Name of the output video
cmdOnly Set this to true if can use only a cmd interface
outPath This is used only if cmdOnly is True and set the directory where the final video will be saved
autoRes False to disable
widthEes Width resolution of the video if autoRes is disabled
heightRes Height resolution of the video if autoRes is disabled
INTRO DESCRIPTION
activate True to enable
time Duration in seconds
font Name of the font file without the extension(must be .ttf),must be positioned in /res
textRatio The ratio of the width of the text compared to the width of the frame
customBg True to use a custom background image in the ranking slides
customBgFileName Name of the file of the custom background image(must be in /res)
RANKING DESCRIPTION
activate True to enable
time Duration in seconds
font Name of the font file without the extension(must be .ttf),must be positioned in /res
textRatio The ratio of the width of the text compared to the width of the frame
customBg True to use a custom background image in the ranking slides
customBgFileName Name of the file of the custom background image(must be in /res)
OUTRO DESCRIPTION
activate True to enable
text Text displayed
time Duration in seconds
font Name of the font file without the extension(must be .ttf),must be positioned in /res
textRatio The ratio of the width of the text compared to the width of the frame
customBg True to use a custom background image in the ranking slides
customBgFileName Name of the file of the custom background image(must be in /res)

You can test how the font size of the config file will be displayed on the slides by using the testFont.py

While in the directory:

python testFont.py

⚠️ DISCLAIMER ⚠️

  • Your IP could be banned by Twitch, use the program at your own risk!
  • We aren't connected in any way with the twitch company
  • We do not take any responsability for any improper/illegal use of this program

CREDITS

  • Created by Giulio Venturini

twitch-best-of's People

Contributors

bayodev avatar dependabot[bot] 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

Watchers

 avatar  avatar

twitch-best-of's Issues

:/

[i]Fetching data
Traceback (most recent call last):
File "C:\Users\nikla\Desktop\Twitch-Best-Of-0.0.1\main.py", line 93, in
main()
File "C:\Users\nikla\Desktop\Twitch-Best-Of-0.0.1\main.py", line 54, in main
data = fetch_clips_channel(name,max=nclips,range=range_in)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nikla\Desktop\Twitch-Best-Of-0.0.1\modules\twitchClips.py", line 132, in fetch_clips_channel
data = bs(get_loaded_page_content(f"https://www.twitch.tv/{channel_name}/clips?filter=clips&range={range}",type='channel'),'html.parser')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nikla\Desktop\Twitch-Best-Of-0.0.1\modules\twitchClips.py", line 64, in get_loaded_page_content
WebDriverWait(driver,60).until(lambda test : len(driver.find_elements_by_tag_name('article'))!=0)
File "C:\Users\nikla\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\support\wait.py", line 86, in until
value = method(self._driver)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nikla\Desktop\Twitch-Best-Of-0.0.1\modules\twitchClips.py", line 64, in
WebDriverWait(driver,60).until(lambda test : len(driver.find_elements_by_tag_name('article'))!=0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'WebDriver' object has no attribute 'find_elements_by_tag_name'

!!

You could implement to search by game and not by channel.

help

Traceback (most recent call last):
File "F:\compli\Twitch-Best-Of-Gen-main\Twitch-Best-Of-Gen-main\main.py", line 5, in
from modules.input_handler import *
File "F:\compli\Twitch-Best-Of-Gen-main\Twitch-Best-Of-Gen-main\modules\input_handler.py", line 4, in
from cv2 import fastNlMeansDenoising
ModuleNotFoundError: No module named 'cv2

Please troubleshoot this if possible

Checking if the category is available...
Traceback (most recent call last):
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 969, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1438, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "F:\compli\Twitch-Best-Of-Gen-main\main.py", line 72, in
main()
File "F:\compli\Twitch-Best-Of-Gen-main\main.py", line 37, in main
name,nclips,range,iPath,type,langs = getInputs()
File "F:\compli\Twitch-Best-Of-Gen-main\modules\input_handler.py", line 124, in getInputs
resp = isCategory(ca)
File "F:\compli\Twitch-Best-Of-Gen-main\modules\twitchClips.py", line 38, in isCategory
data = getLoadedPageContent("https://www.twitch.tv/directory/game/"+name,delay=15)
File "F:\compli\Twitch-Best-Of-Gen-main\modules\twitchClips.py", line 56, in getLoadedPageContent
driver = webdriver.Chrome(options=options)
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
self.service.start()
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

Need help

Hey, could you guide me though process of installing we driver, the docs you linked didn't work, thanks, have a good day/night

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.