Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playdede url dinámica #1380

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion plugin.video.alfa/channels/playdede.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,30 @@
"doodstream": "doodstream",
}


# Función que obtiene la URL del host dinámico de Playdede, que es cambiada por los moderadores de la propia página.
# Así siempre se tendrá la URL correcta del host pese a que la URL de Playdede cambie.
def get_dynamic_host():
url = 'https://entrarplaydede.com/'
logger.info('Downloading page: {}'.format(url))
data = httptools.downloadpage(url, timeout=30)
logger.info('Page downloaded successfully')
soup = BeautifulSoup(data.data, 'html.parser')
host_url = soup.find('article').find('h1').find('b').find('a').get('href')

# Verificar si el host_url contiene 'playdede.link'
if 'playdede.link' not in host_url:
logger.error('Dynamic host URL does not contain playdede.link')
return None

logger.info('Dynamic host URL: {}'.format(host_url))
return host_url

list_language = list(IDIOMAS.values())
list_quality = ["HD1080", "HD720", "HDTV", "DVDRIP"]
list_quality_tvshow = list_quality_movies = list_quality
list_servers = list(SERVIDORES.values())
host = "https://www2.playdede.link/"
host = get_dynamic_host()
assistant = config.get_setting(
"assistant_version", default=""
) and not httptools.channel_proxy_list(host)
Expand Down