RandomThemes
Alfa
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
depende que urls y cual selecciones en "const apiUrl =" o depende como hagas tu scriptlleva un genrador ya sea de peliculas,series,episodios
te regístras en el sitio web de TMDB (https://www.themoviedb.org/) y creas una cuenta.como pueden hacer eso o como
poder hacer eso..
pues como cualquier feed/json depende que quieres que te muestre y que orden y que seleccionesAlguno sabe como crear el generador ..?
Hola. Puedes usar las apis de themoviesdb https://developer.themoviedb.org/reference/intro/getting-startedAlgo asi, nomas que no tengo api:
Ver el archivo adjunto 1204394
ohh reallyBro Massage I Will Help You...
crea un nuevo blog agrega tu URL personalizada ejemplo gdp.tudominio.com y aquí te dejo la plantilla lista para usarHola mi nombre es Alejandro o mi nombre del foro RandomThemes soy un bloggero por decir algo basico estoy iniciando aunque, ya tengo en si unos conocimientos que como controlar la pagina de blogger etcc.., una pregunta siempre he visto o visualizo que la plantillas para peliculas e streaming, lleva un genrador ya sea de peliculas,series,episodios. etc.Por casualidad alguien podria decirme como pueden hacer eso o como
poder hacer eso..
Algunos dicen que el generador ya sea de peliculas etc..porque usa la api de TMDB es mas recomendable para una plantillas de peliculas..etc.
porque,es mas facil que hacerlo en segundo y no demorar demasiado...
Alguno sabe como crear el generador ..?
Gran aporte bro. Muy interesante tu codigo.crea un nuevo blog agrega tu URL personalizada ejemplo gdp.tudominio.com y aquí te dejo la plantilla lista para usar
Ver el archivo adjunto 1211661
Insertar CODE, HTML o PHP:<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html> <html b:css='false' b:js='true' expr:dir='data:blog.languageDirection' expr:lang='data:blog.locale.language' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'><b:attr name='xmlns' value=''/><b:attr name='xmlns:b' value=''/><b:attr name='xmlns:expr' value=''/><b:attr name='xmlns:data' value=''/> <head> <title><data:blog.title/></title> <b:skin><![CDATA[body { background-color: #333; color: #fff; font-family: Arial, sans-serif; } .content { display: flex; flex-direction: column; align-items: center; padding: 20px; } .search-section, .results-section { margin: 10px; text-align: center; } #poster { max-width: 100%; max-height: 500px; } label { margin-right: 20px; color: #fff; } button { background-color: #007bff; color: #fff; border: none; padding: 10px; border-radius: 5px; cursor: pointer; margin-top: 10px; } button:hover { background-color: #0056b3; } textarea { width: 100%; height: 150px; margin-top: 10px; background-color: #222; color: #fff; border: 1px solid #555; padding: 10px; resize: none; } #trailer-container { margin-top: 10px; } ]]></b:skin> </head> <body> <center><h1>Buscar Películas y Series</h1></center> <div class='content'> <div class='search-section'> <input checked='checked' id='serie' name='tipo' type='radio' value='tv'/> <label for='serie'>Serie</label> <input id='pelicula' name='tipo' type='radio' value='movie'/> <label for='pelicula'>Película</label> <input id='search-input' placeholder='Buscar...' type='search'/> <button id='search-btn' type='button'>Buscar</button> </div> <div class='results-section'> <h2>Poster</h2> <img alt='Poster' id='poster' src=''/> <h2>Resultado</h2> <textarea id='result-text'/> <h2>Tráiler</h2> <div id='trailer-container'/> <textarea id='html-content' style='display:none;'/> <button onclick='copiarHTMLAlPortapapeles()'>Copiar HTML</button> </div> </div> <b:section id='FranOrrego' showaddelement='false'/> <script type='text/javascript'>/*<![CDATA[*/ document.getElementById("search-btn").addEventListener("click", function() { const tipo = document.querySelector('input[name="tipo"]:checked').value; const query = document.getElementById("search-input").value; buscar(tipo, query); }); function buscar(tipo, query) { const apiKey = "f6cd5c1a9e6c6b965fdcab0fa6ddd38a"; const url = `https://api.themoviedb.org/3/search/${tipo}?api_key=${apiKey}&language=es-ES&query=${encodeURIComponent(query)}`; fetch(url) .then(response => response.json()) .then(data => { if (data.results.length > 0) { const firstResultId = data.results[0].id; obtenerDetalles(tipo, firstResultId, apiKey); } else { document.getElementById("result-text").value = "No se encontraron resultados."; } }) .catch(error => console.error('Error:', error)); } function obtenerDetalles(tipo, id, apiKey) { const urlDetalles = `https://api.themoviedb.org/3/${tipo}/${id}?api_key=${apiKey}&language=es-ES`; fetch(urlDetalles) .then(response => response.json()) .then(data => { const posterPath = `https://image.tmdb.org/t/p/w500${data.poster_path}`; document.getElementById("poster").src = posterPath; const description = ` Título: ${data.title || data.name} Título Original: ${data.original_title || data.original_name} Sinopsis: ${data.overview} ${tipo === 'movie' ? `Duración: ${data.runtime} minutos` : ''} ${tipo === 'tv' ? `Número de Temporadas: ${data.number_of_seasons}, Episodios: ${data.number_of_episodes}` : ''} Géneros: ${data.genres.map(genre => genre.name).join(', ')} Año: ${data.release_date ? data.release_date.substring(0, 4) : data.first_air_date.substring(0, 4)} Fecha de Lanzamiento: ${data.release_date || data.first_air_date} Calificación: ${data.vote_average} Estado: ${data.status} Países de producción: ${data.production_countries.map(country => country.name).join(', ')} `; document.getElementById("result-text").value = description.trim(); obtenerTrailer(tipo, id, apiKey, data); }) .catch(error => console.error('Error:', error)); } function obtenerTrailer(tipo, id, apiKey, movieData) { const urlVideos = `https://api.themoviedb.org/3/${tipo}/${id}/videos?api_key=${apiKey}&language=es-ES`; fetch(urlVideos) .then(response => response.json()) .then(data => { const trailers = data.results.filter(video => video.type === "Trailer" && video.iso_639_1 === "es"); let trailerUrl = ""; if (trailers.length > 0) { trailerUrl = `https://www.youtube.com/embed/${trailers[0].key}`; const trailerContainer = document.getElementById("trailer-container"); trailerContainer.innerHTML = `<iframe width="560" height="315" src="${trailerUrl}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`; } else { document.getElementById("trailer-container").innerHTML = "Tráiler no disponible en español."; } generarHTMLParaCopiar(movieData, trailerUrl); }) .catch(error => console.error('Error:', error)); } function generarHTMLParaCopiar(data, trailerUrl) { const htmlContent = ` <div> <h2>${data.title || data.name}</h2> <img src="https://image.tmdb.org/t/p/w500${data.poster_path}" alt="${data.title || data.name}"> <p>${data.overview}</p> ${trailerUrl ? `<iframe width="560" height="315" src="${trailerUrl}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>` : ''} </div> `; document.getElementById("html-content").value = htmlContent; } function copiarHTMLAlPortapapeles() { const htmlContent = document.getElementById("html-content"); htmlContent.style.display = "block"; htmlContent.select(); document.execCommand("copy"); htmlContent.style.display = "none"; alert("HTML copiado al portapapeles."); } /*]]>*/</script> </body> </html>
Muchas Gracias jcduranm 😁.Creo que con esta podre ir entendienlo un poco mas.Graciascrea un nuevo blog agrega tu URL personalizada ejemplo gdp.tudominio.com y aquí te dejo la plantilla lista para usar
Ver el archivo adjunto 1211661
Adjunto la plantilla lista para usar en blogger
Me alegra mucho que mi contribución te haya sido útil! El código que proporcioné es totalmente funcional y está listo para ser utilizadoMuchas Gracias jcduranm 😁.Creo que con esta podre ir entendienlo un poco mas.Gracias
si, nomas que el resultado te lo da en json y no en htmlAlgo asi:
Tome como base su html y aquí está el resultado completamente funcionalsi, nomas que el resultado te lo da en json y no en html
y te faltaria que en el poster/imagen te ponga el título, resumen, etc
crea un nuevo blog agrega tu URL personalizada ejemplo gdp.tudominio.com y aquí te dejo la plantilla lista para usar
Ver el archivo adjunto 1211661
Adjunto la plantilla lista para usar en blogger
bro can you help me ? to create a movie generator ? actually i am 16 and i do not have much knowledge of the codes for creating a generatorBro Massage I Will Help You...
The file that I left attached in some comments above is ready to be used as a blogger templatebro can you help me ? to create a movie generator ? actually i am 16 and i do not have much knowledge of the codes for creating a generator
Utilizamos cookies y tecnologías similares para los siguientes fines:
¿Aceptas las cookies y estas tecnologías?
Utilizamos cookies y tecnologías similares para los siguientes fines:
¿Aceptas las cookies y estas tecnologías?