Git Product home page Git Product logo

twitchtube's Introduction

offish

hobbyist programmer on a stack no cap

'

'
1JMTVxReTE9nyXorzPPReLpWXXrRkSybaZ


offish 2020

twitchtube's People

Contributors

gobot1234 avatar hexiro avatar officiallysp avatar offish avatar verybigsad 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

twitchtube's Issues

Error when trying to upload: Unable to locate element: .../ytcp-mention-textbox[2]

Hi ! I tried to upload a video today but there is this error :

twitchtube | 19:36:09 - error: There was an error Message: Unable to locate element: /html/body/ytcp-uploads-dialog/paper-dialog/div/ytcp-animatable[1]/ytcp-uploads-details/div/ytcp-uploads-basics/ytcp-mention-textbox[2]
 when trying to upload to YouTube

Am I the only one who can't upload recently with twitchtube?
Maybe there was an update of Youtube upload page ? Idk, I will fork and check what's wrong.

clips

it only grabs 5 clips each time i try to run it, and it isn't meeting the time that i want it to be.

Error SSL

I dont know why, but for some reason when i start script i only get these errors.

twitchtube | 09:16:58 - info: You're running the latest version of twitchtube at 1.6.5 twitchtube | 09:16:58 - info: You're running the latest version of opplast at 1.0.7 twitchtube | 09:16:58 - info: Going to make video featuring 1 streamers/games, that will end up being ~330.0 seconds long twitchtube | 09:16:59 - info: Getting clips for game League of Legends twitchtube | 09:16:59 - clip: Downloading clip with slug: FaithfulOnerousLadiesHotPokket-8Ertpoet8m5S7-xb. twitchtube | 09:16:59 - clip: Saving 'FaithfulOnerousLadiesHotPokket-8Ertpoet8m5S7-xb' as 'FaithfulOnerousLadiesHotPokket8Ertpoet8m5S7xb.mp4'. Traceback (most recent call last): File "C:\Users\Nikola\Downloads\twitchtube-1.6.5\twitchtube-1.6.5\main.py", line 80, in <module> make_video(**parameters) File "C:\Users\Nikola\Downloads\twitchtube-1.6.5\twitchtube-1.6.5\twitchtube\video.py", line 147, in make_video names += download_clips(batch, path, oauth_token, client_id) File "C:\Users\Nikola\Downloads\twitchtube-1.6.5\twitchtube-1.6.5\twitchtube\clips.py", line 187, in download_clips download_clip(data[clip]["url"], path, oauth_token, client_id) File "C:\Users\Nikola\Downloads\twitchtube-1.6.5\twitchtube-1.6.5\twitchtube\clips.py", line 81, in download_clip urllib.request.urlretrieve(mp4_url, output_path, reporthook=get_progress) File "C:\Users\Nikola\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 239, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File "C:\Users\Nikola\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 214, in urlopen return opener.open(url, data, timeout) File "C:\Users\Nikola\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 517, in open response = self._open(req, data) File "C:\Users\Nikola\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 534, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "C:\Users\Nikola\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 494, in _call_chain result = func(*args) File "C:\Users\Nikola\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 1389, in https_open return self.do_open(http.client.HTTPSConnection, req, File "C:\Users\Nikola\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 1315, in do_open h = http_class(host, timeout=req.timeout, **http_conn_args) File "C:\Users\Nikola\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1396, in __init__ context = ssl._create_default_https_context() File "C:\Users\Nikola\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 750, in create_default_context context.load_default_certs(purpose) File "C:\Users\Nikola\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 574, in load_default_certs self._load_windows_store_certs(storename, purpose) File "C:\Users\Nikola\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 566, in _load_windows_store_certs self.load_verify_locations(cadata=certs) ssl.SSLError: [ASN1] nested asn1 error (_ssl.c:4174)

Add UTF-8 encoding to Twitch Clip Title

Please add UTF-8 encoding to Twitch Clip Title if it is non-English.

twitchtube | 07:09:26 - info: Downloading clip with slug: UglyVibrantCrabsCharlietheUnicorn.
Traceback (most recent call last):
  File "main.py", line 43, in <module>
    names = download_clips(clips, VIDEO_LENGTH, path)
  File "/home/kyroskoh/twitchtube/twitchtube/clips.py", line 144, in download_clips
    download_clip(data[clip]['url'], path)
  File "/home/kyroskoh/twitchtube/twitchtube/clips.py", line 91, in download_clip
    log.info(f'Saving "{clip_title}" as "{out_filename}".')
  File "/home/kyroskoh/twitchtube/twitchtube/logging.py", line 21, in info
    log(f.GREEN, 'info', text)
  File "/home/kyroskoh/twitchtube/twitchtube/logging.py", line 15, in log
    print(f'{f.GREEN}twitchtube {f.WHITE}| {time} - {color + sort}{f.WHITE}: {text}{f.WHITE}')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 58-59: ordinal not in range(256)

NameError: name 'data' is not defined, Python 3.7, 3.8

I downloaded all from requirements.txt. when i run main.py, i get error. How fix this?
twitchtube | 15:55:50 - info: Starting to make a video for Team Fortress 2 Traceback (most recent call last): File "C:\twitchtube-master2\main.py", line 29, in <module> names = download_clips(clips, VIDEO_LENGTH, path) File "C:\twitchtube-master2\dist\clips.py", line 97, in download_clips download_clip(data[clip]["url"], path) File "C:\twitchtube-master2\dist\clips.py", line 36, in download_clip mp4_url, clip_title = get_clip_data(slug) File "C:\twitchtube-master2\dist\clips.py", line 14, in get_clip_data thumb_url = clip_info['data'][0]['thumbnail_url'] KeyError: 'data'

Already Made a video for 'Game'. Re-checking in 1 hour. ERROR

The problem is quite simple.
No matter if the script generated a video in the last 24 hours, but it seems to only work one time.
Also, on the config you can check the time the script check if a video have been made but the 1 hour message is hard coded.
So it not show the currently time set in the config.

Basically it works only one day.
I wasnt able to let the script generate 2 clips from 2 differents days.

Freeze of my computer

Hello,
It seems to me to have configured everything well but when the "Wrinting video (directory)/rendered.mp4 bar reaches 70% of loading my computer freezes. I have no errors at the time of the freeze.

Do you have any idea where this might come from?

Thanks

One clip each update without repeating the clip.

Would it be possible to configure to upload on youtube automatically after a new clip is generated on the twitch without repeating the clip?

On YouTube Brazil there is a channel called "Lucas Motta Clips" that posts a new clip every 20 minutes. Currently, it has 7,130 videos uploaded in approximately 8 months. (Probably a bot)

I want to test the limit of daily uploads from YouTube in order to exceed the number of videos uploaded.

Youtube found then...

DEBUG: Found YouTube upload Dialog Modal
DEBUG: Trying to set "dead 2mw then OMEGALULS" as title...
twitchtube | 15:22:23 - error: There was an error Message: Element <div id="textbox" class="style-scope ytcp-mention-textbox"> is not clickable at point (484,291) because another element <img id="illustration" class="style-scope ytcp-warm-welcome-dialog" src="https://www.gstatic.com/youtube/img/creator/user_onboarding/warm_welcome_illustration_default_v3_darkmode.svg"> obscures it
 when trying to upload to YouTube
DEBUG: Closed Firefox
twitchtube | 15:22:25 - info: Getting files to delete...

it didnt upload , and then it deleted all of the clips without uploading the render

Migration to new version of API required

Error message to any request to twitch when trying to start the bot:
The v5 API is deprecated and will be shutdown on February 28, 2022. Applications that have not accessed v5 before July 15, 2021 no longer have access to v5. For more information on the v5 API shutdown plan, see https://blog.twitch.tv/2021/07/15/legacy-twitch-api-v5-shutdown-details-and-timeline/ and the Twitch API documentation at https://dev.twitch.tv/docs/api.

improvement

I wonder it's possible to add the name of the streamer directly at the top of the video in addition to the credits in the discription

Only use top clips?

Is there anyway in the current Twitchtube release to only use Top clips from the channels you specified or does this already do this and do I have bad settings/too small channels.

Issues authorizing youtube application

Hi, I am having trouble authorizing the youtube application. When I open auth_url in the browser, select my google account and youtube channel, it gives me 403 error, even though I chose an email I created an app from.
Do I need to verify my app in order to upload youtube videos?
image

Fails to edit video for youtube

I decided to test this out with the just chatting Catagory. The twitch clips download fine but afterwards. I get a traceback error
image

premission credentials

Traceback (most recent call last):
File "/data/data/com.termux/files/home/twitch/main.py", line 50, in
upload_video_to_youtube(config)
File "/data/data/com.termux/files/home/twitch/twitchtube/upload.py", line 206, in upload_video_to_youtube
os.makedirs(f'{PATH}/credentials')
File "/data/data/com.termux/files/usr/lib/python3.9/os.py", line 225, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/data/data/com.termux/files/home/twitch/credentials'

Can't upload to youtube

The clips downloaded fine but it does not upload to youtube even with the firefox profile

Traceback (most recent call last):
File "C:\Users\Zendek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\common\service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.752.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.752.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Zendek\Desktop\twitchtube-master\main.py", line 55, in
upload = Upload(ROOT_PROFILE_PATH, SLEEP, HEADLESS, DEBUG)
File "C:\Users\Zendek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\opplast\upload.py", line 22, in init
self.driver = webdriver.Firefox(firefox_profile=profile, options=options)
File "C:\Users\Zendek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\firefox\webdriver.py", line 164, in init
self.service.start()
File "C:\Users\Zendek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\common\service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

[Feature Request] mix clip when in channel mode

Hi, i love your python app 👍
I was thinking that it would be a great addition to do like the game mode but for the channel mode 👍 and maybe the name of the streamers in simple text at the start of any clip 👍

[Error] Could not find 'clips' in response

Hi, just updated to the new version and i'm getting this error when i want to make a new video, here is the error

C:\Users\MyUser\Desktop\twitchtube> python main.py "c mychannel, c friend1channel, c friend2channel, c friend3channel, c friend4channel" --duration 10.5 --resolution 1080 1920
twitchtube | 17:45:27 - info: Running twitchtube at v1.6.0
twitchtube | 17:45:27 - info: Starting to make video with 5 streamers/games
Traceback (most recent call last):
  File "C:\Users\User\Desktop\twitchtube\main.py", line 82, in <module>
    make_video(**parameters)
  File "C:\Users\User\Desktop\twitchtube\twitchtube\video.py", line 91, in make_video
    new_clips, new_ids = get_clips(
  File "C:\Users\User\Desktop\twitchtube\twitchtube\clips.py", line 128, in get_clips
    raise WrongKrakenResponse(f"Could not find 'clips' in response. {response}")
twitchtube.exceptions.WrongKrakenResponse: Could not find 'clips' in response. {'clips': [], '_cursor': ''}

Issues on Win 10

Python 3.0 (r30:67507, Dec  3 2008, 19:44:23) [MSC v.1500 64 bit (AMD64)] on win32
IDLE 3.0      ==== No Subprocess ====
>>> 
Traceback (most recent call last):
  File "twitchtube-master\example.py", line 1, in <module>
    from twitchtube.video import make_video
  File "\twitchtube\video.py", line 83
    f"You're running an old version of {project}, installed: {version}, current: {current}"
                                                                                          ^
SyntaxError: invalid syntax
>>> 

PermissionError: [Errno 13] Permission denied:

~/twitch $ python main.py
Traceback (most recent call last):
File "/data/data/com.termux/files/home/twitch/main.py", line 9, in
from twitchtube.config import *
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 786, in exec_module
File "", line 922, in get_code
File "", line 979, in get_data
PermissionError: [Errno 13] Permission denied: '/data/data/com.termux/files/home/twitch/twitchtube/config.py'
~/twitch $

Nonsense clips

How can I avoid clips that don't have anything attractive?

Many people clip nonsense, a clip where nothing much happens. Is there any way to prevent this?

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escap

After running the python main.py command I get this error.

Traceback (most recent call last):
File "C:\Users*\Downloads\youtube\twitchtube-master\main.py", line 8, in
from twitchtube.config import *
File "C:\Users*
\Downloads\youtube\twitchtube-master\twitchtube\config.py", line 15
ROOT_PROFILE_PATH = "C:\Users****\AppData\Roaming\Mozilla\Firefox\Profiles\5q8sjx41.Selenium2"
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

Impossible to create more than 50 minutes video

Hello, I want to do a 3 hours video but I can't.

I did some tests and I guess it's impossible to do a longer video than around 50 minutes with this params :

VIDEO_LENGTH = 60

More than 60 doesn't work.

Upload video

I have downloaded twitchtube some time ago and i started getting errors when uploading the video to youtube, so i came here to see if i messed up the code and the upload file is gone.

FileNotFoundError: [WinError 2] The specified file is not found

Hello,
Just after the video is done recording ("twitchtube | 11:26:13 - info: Video is done rendering!") I have this error poping in my command prompt:
`Traceback (most recent call last):
File "C:\Users\Narvalo V2\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\Narvalo V2\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Narvalo V2\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The specified file is not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\BOT Twitch\V2\twitchtube-master\main.py", line 76, in
make_video(**parameters)
File "D:\BOT Twitch\V2\twitchtube-master\twitchtube\video.py", line 173, in make_video
upload = Upload(profile_path, sleep, headless, debug)
File "C:\Users\Narvalo V2\AppData\Local\Programs\Python\Python39\lib\site-packages\opplast\upload.py", line 24, in init
self.driver = webdriver.Firefox(firefox_profile=profile, options=options)
File "C:\Users\Narvalo V2\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 164, in init
self.service.start()
File "C:\Users\Narvalo V2\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.`

It stops the program before uploading on Youtube and I can't find the solution. Do you have any idea?

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.