Added separate file for dictionaries

This commit is contained in:
UrloMythus
2024-08-24 12:04:11 +02:00 Unverified
parent 8239af6abf
commit f69fdfcf6a
4 changed files with 38 additions and 37 deletions
+32
View File
@@ -0,0 +1,32 @@
okru = {
"rai1": "https://ok.ru/videoembed/7703488765552?nochat=1",
"rai2": "https://ok.ru/videoembed/7805618364016?nochat=1"
}
STREAM = {
"channels": [
{
"id": "la7",
"title": "LA7",
"url": "https://d3749synfikwkv.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-74ylxpgd78bpb/Live.m3u8"
},
{
"id": "rai1",
"title": "Rai 1",
"url": "https://m3u.iranvids.com/rai01/output.m3u8",
"behaviorHints": {
"notWebReady": True,
"proxyHeaders": {
"request": {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
}
}
}
},
{
"id": "rai2",
"title": "Rai 2",
"url": "https://m3u.iranvids.com/rai02/output.m3u8"
}
]
}
+1 -6
View File
@@ -1,12 +1,7 @@
import requests
from bs4 import BeautifulSoup
import json
okru = {
"rai1": "https://ok.ru/videoembed/7703488765552?nochat=1",
"rai2": "https://ok.ru/videoembed/7805618364016?nochat=1"
}
from dictionaries import okru
+1 -27
View File
@@ -9,6 +9,7 @@ import config
import logging
from okru import okru_get_url
from animeworld import animeworld
from dictionaries import okru, STREAM
# Configure logging
FILMPERTUTTI = config.FILMPERTUTTI
STREAMINGCOMMUNITY = config.STREAMINGCOMMUNITY
@@ -43,33 +44,6 @@ MANIFEST = {
"description": "Addon providing HTTPS Stream for Italian Movies/Series",
"logo": "https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png"
}
STREAM = {
"channels": [
{
"id": "la7",
"title": "LA7",
"url": "https://d3749synfikwkv.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-74ylxpgd78bpb/Live.m3u8"
},
{
"id": "rai1",
"title": "Rai 1",
"url": "https://m3u.iranvids.com/rai01/output.m3u8",
"behaviorHints": {
"notWebReady": True,
"proxyHeaders": {
"request": {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
}
}
}
},
{
"id": "rai2",
"title": "Rai 2",
"url": "https://m3u.iranvids.com/rai02/output.m3u8"
}
]
}
+4 -4
View File
@@ -10,7 +10,7 @@ TF_DOMAIN = config.TF_DOMAIN
##FOR NOW ONLY MOVIES WORK, I HOPE I CAN FIX SERIES
def search(showname,ismovie,date):
url = f'https://www.tanti.bond/search/{showname}'
url = f'https://www.tanti.{TF_DOMAIN}/search/{showname}'
response = requests.get(url)
soup = BeautifulSoup(response.text, "lxml")
if ismovie == 1:
@@ -44,7 +44,7 @@ def search(showname,ismovie,date):
return url,embed_id
def fast_search(showname,ismovie):
url = f'https://www.tanti.bond/search/{showname}'
url = f'https://www.tanti.{TF_DOMAIN}/search/{showname}'
response = requests.get(url)
soup = BeautifulSoup(response.text, "lxml")
if ismovie == 1:
@@ -85,7 +85,7 @@ def get_protect_link(id,url):
data = {
'id': embed_id
}
ajax_url = "https://www.tanti.bond/ajax/embed"
ajax_url = f"https://www.tanti.{TF_DOMAIN}/ajax/embed"
response = requests.post(ajax_url, headers=headers, data=data)
hdplayer = response.text[43:-27]
response = requests.get(hdplayer)
@@ -119,7 +119,7 @@ def get_nuovo_indirizzo_and_protect_link(url,embed_id,season,episode):
data = {
'id': embed_id
}
ajax_url = "https://www.tanti.bond/ajax/embed"
ajax_url = f"https://www.tanti.{TF_DOMAIN}/ajax/embed"
response = requests.post(ajax_url, headers=headers, data=data)
nuovo_indirizzo = response.text[43:-27]
response = requests.get(nuovo_indirizzo)