v.2.0.2 Cam4 Anonymous All Mode Recorder for Python27

This commit is contained in:
horacio9a 2021-05-28 08:06:07 +02:00 committed by GitHub
parent 2fc0e29b84
commit 4af7ed28a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

16
c4.py
View file

@ -1,4 +1,4 @@
# Cam4 Anonymous All Modes Recorder v.2.0.1 by horacio9a for Python 2.7.18
# Cam4 Anonymous All Modes Recorder v.2.0.2 by horacio9a for Python 2.7.18
# coding: utf-8
import sys, os, urllib, urllib3, ssl, re, time, datetime, requests, random, command
@ -283,7 +283,7 @@ if 'canUseCDN":true' in dec:
while True:
try:
mode = int(raw_input(colored(' => Mode => Exit(6) - URL(5) - YTDL(4) - LS(3) - SL(2) - FFMPEG(1) - FFPLAY(0) => ', 'white', 'on_green')))
mode = int(raw_input(colored(' => Mode => Exit(6) - URL(5) - YTDL(4) - LS(3) - SL(2) - FFMPEG(1) - PLAYER(0) => ', 'white', 'on_green')))
break
except ValueError:
print
@ -293,7 +293,7 @@ if 'canUseCDN":true' in dec:
print(colored(' => Too big number <=', 'white', 'on_red'))
mod = 'EXIT'
if mode == 0:
mod = 'FFPLAY'
mod = 'PLAYER'
if mode == 1:
mod = 'FFMPEG'
if mode == 2:
@ -319,19 +319,21 @@ if 'canUseCDN":true' in dec:
pf2 = (path + fn2)
pf3 = (path + fn3)
pf4 = (path + fn4)
ffplay = Config.get('files', 'ffplay')
player = Config.get('files', 'player')
ffmpeg = Config.get('files', 'ffmpeg')
youtube = Config.get('files', 'youtube')
streamlink = Config.get('files', 'streamlink')
livestreamer = Config.get('files', 'livestreamer')
if mod == 'FFPLAY':
if mod == 'PLAYER':
print
print (colored(' => FFPLAY => {} <=', 'white', 'on_magenta')).format(fn)
command = '{} -loglevel panic -i {} -infbuf -autoexit -x 640 -y 480 -window_title "{} * {}"'.format(ffplay,hlsurl,fn,mn)
print (colored(' => PLAYER => {} <=', 'white', 'on_magenta')).format(fn)
print
command = ('{} -p {} hlsvariant://{} best'.format(livestreamer, player, hlsurl))
os.system(command)
while True:
try:
print
prog = int(raw_input(colored(' => Mode => URL(5) - YTDL(4) - LS(3) - SL(2) - FFMPEG(1) - Exit(0) => ', 'white', 'on_green')))
break
except ValueError: