forked from rDrama/rDrama
go from dutch to greek in /live
parent
0ee100895a
commit
e474a5f42d
|
@ -443,7 +443,7 @@ if SITE == 'pcmemes.net':
|
||||||
live_regex = re.compile('playerOverlayVideoDetailsRenderer":\{"title":\{"simpleText":"(.*?)"\},"subtitle":\{"runs":\[\{"text":"(.*?)"\},\{"text":" • "\},\{"text":"(.*?)"\}', flags=re.A)
|
live_regex = re.compile('playerOverlayVideoDetailsRenderer":\{"title":\{"simpleText":"(.*?)"\},"subtitle":\{"runs":\[\{"text":"(.*?)"\},\{"text":" • "\},\{"text":"(.*?)"\}', flags=re.A)
|
||||||
live_thumb_regex = re.compile('\{"thumbnail":\{"thumbnails":\[\{"url":"(.*?)"', flags=re.A)
|
live_thumb_regex = re.compile('\{"thumbnail":\{"thumbnails":\[\{"url":"(.*?)"', flags=re.A)
|
||||||
offline_regex = re.compile('","title":"(.*?)".*?"width":48,"height":48\},\{"url":"(.*?)"', flags=re.A)
|
offline_regex = re.compile('","title":"(.*?)".*?"width":48,"height":48\},\{"url":"(.*?)"', flags=re.A)
|
||||||
offline_details_regex = re.compile('simpleText":"Gestreamd: ([0-9]*?) ([a-z]*?) geleden"\},"viewCountText":\{"simpleText":"([0-9.]*?) weergaven"', flags=re.A)
|
offline_details_regex = re.compile('simpleText":"Μεταδόθηκε πριν από ([0-9]*?) ([^"]*?)"\},"viewCountText":\{"simpleText":"([0-9.]*?) προβολές"', flags=re.A)
|
||||||
|
|
||||||
def process_streamer(id, live='live'):
|
def process_streamer(id, live='live'):
|
||||||
url = f'https://www.youtube.com/channel/{id}/{live}'
|
url = f'https://www.youtube.com/channel/{id}/{live}'
|
||||||
|
@ -452,7 +452,7 @@ if SITE == 'pcmemes.net':
|
||||||
if '"videoDetails":{"videoId"' in text:
|
if '"videoDetails":{"videoId"' in text:
|
||||||
y = live_regex.search(text)
|
y = live_regex.search(text)
|
||||||
count = y.group(3)
|
count = y.group(3)
|
||||||
if 'wacht' in count:
|
if 'περιμένει' in count:
|
||||||
return process_streamer(id, '')
|
return process_streamer(id, '')
|
||||||
|
|
||||||
try: count = int(count.replace('.', ''))
|
try: count = int(count.replace('.', ''))
|
||||||
|
@ -478,22 +478,22 @@ if SITE == 'pcmemes.net':
|
||||||
quantity = int(y.group(1))
|
quantity = int(y.group(1))
|
||||||
unit = y.group(2)
|
unit = y.group(2)
|
||||||
|
|
||||||
if unit.startswith('minu'):
|
if unit.startswith('λεπτ'):
|
||||||
unit = 'minute'
|
unit = 'minute'
|
||||||
modifier = 1
|
modifier = 1
|
||||||
if unit == 'uur':
|
if unit.startswith('ώρ'):
|
||||||
unit = 'hour'
|
unit = 'hour'
|
||||||
modifier = 60
|
modifier = 60
|
||||||
if unit.startswith('dag'):
|
if unit.startswith('ημέρ'):
|
||||||
unit = 'day'
|
unit = 'day'
|
||||||
modifier = 1440
|
modifier = 1440
|
||||||
if unit.startswith('we'):
|
if unit.startswith('εβδομάδ'):
|
||||||
unit = 'week'
|
unit = 'week'
|
||||||
modifier = 10080
|
modifier = 10080
|
||||||
elif unit.startswith('maand'):
|
elif unit.startswith('μήν'):
|
||||||
unit = 'month'
|
unit = 'month'
|
||||||
modifier = 43800
|
modifier = 43800
|
||||||
elif unit == 'jaar':
|
elif unit.startswith('έτ'):
|
||||||
unit = 'year'
|
unit = 'year'
|
||||||
modifier = 525600
|
modifier = 525600
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue