Arabic Cartoons

TODO: What I'm currently doing is fiddling with the source HTML directly.
- The HTML is no longer generated from this Org!
A simple interface to watch the engaging Arabic cartoons.
(repl-driven-development [C-x C-j] javascript) (shell-command-to-string "npm install -g axios cheerio")
// HTTP library, and HTML parsing library // axios = require('axios'); let cheerio = require('cheerio'); // show : {first: integer}; ep : integer async function getEpisode(show, ep) { html = (await axios.get(`https://www.arteenz.com/watch-${show.first + ep}.html`)).data; $ = cheerio.load(html); title = $('title').text(); url = $('iframe').attr('src'); return {title, url}; } // show : {first: integer, episodes: integer} async function getEpisodes(show) { return await Promise.all([...Array(show.episodes - 1).keys()] .map(ep => getEpisode(show, ep))) } // shows : [{title: string, first: integer, episodes: integer}] async function getShows() { return await Promise.all([...Array(shows.length).keys()] .map(async function(i) { return {title: shows[i].title, episodes: await getEpisodes(shows[i])} })) } const fs = require('fs'); shows_exploded = [] async function add(show) { shows_exploded.push({title: show.title, episodes: await getEpisodes(show)}); } // “first” is the where to find the first episode of this show: https://www.arteenz.com/watch-𝒳𝒳𝒳.html // MA: M-x sort-lines ⨟⨟ M-x align-regexp first // MA: “🧒🏾” denotes that this show is probably toddler friendly // MA: Shows prefixed “ ” denote that this show is /not/ toddler friendly. // Note: I originally prefixed the child emoji to the shows, but it appears alphabetically at the end, so the sort is not ideal. await add({ title: "Aladdin ≈ علاء الدين 🧒🏾", first: 7269, episodes: 116 }); await add({ title: "Arthur ≈ ارثر 🧒🏾", first: 21284, episodes: 33 }); await add({ title: "Avatar The Last Airbender ≈ أفاتار اسطورة انج الجزء 1 🧒🏾", first: 2256, episodes: 20 }); await add({ title: "Baby Looney Toones ≈ بابي لوني تيونز 🧒🏾", first: 30846, episodes: 29 }); await add({ title: "Calliou ≈ كايو 🧒🏾", first: 29646, episodes: 18 }); await add({ title: "Cars and Buses ≈ ابطال المدينة 🧒🏾", first: 35242, episodes: 25 }); await add({ title: "Case Closed ≈ المحقق كونان 🧒🏾", first: 32210, episodes: 54 }); await add({ title: "Chalk Zone ≈ عالم الطباشير 🧒🏾", first: 14046, episodes: 31 }); await add({ title: "Doraemon ≈ دورايمون 🧒🏾", first: 25044, episodes: 224 }); await add({ title: "Dragon Tales ≈ حكايات جزيرة التنين 🧒🏾", first: 22645, episodes: 77 }); await add({ title: "Fixies ≈ الفيكسيز 🧒🏾", first: 27067, episodes: 103 }); // Overflows onto other shows await add({ title: "Franklin The Turtle ≈ مغامرات فريد 🧒🏾", first: 13675, episodes: 52 }); await add({ title: "Go Diego Do ≈ هيا دييغو هيا 🧒🏾", first: 15792, episodes: 25 }); await add({ title: "Little Bear ≈ دبدوب المحبوب 🧒🏾", first: 24937, episodes: 26 }); await add({ title: "Marko ≈ ماروكو الصغيرة الجزء 1 🧒🏾", first: 13461, episodes: 33 }); await add({ title: "Micky Mouse Clubhouse ≈ ميكي ماوس كلوب هاوس 🧒🏾", first: 35122, episodes: 26 }); await add({ title: "My Loving Father ≈ أبي الحنون 🧒🏾", first: 6037, episodes: 15 }); await add({ title: "Paw Patrol ≈ دوريات المخلاب 🧒🏾", first: 33784, episodes: 26 }); await add({ title: "Pokemon ≈ بوكيمون 🧒🏾", first: 3468, episodes: 82 }); await add({ title: "Prophets of Allah ≈ أنبياء الله 🧒🏾", first: 30118, episodes: 29 }); await add({ title: "Rocky Rocket Raccoon ≈ روكي راكات 🧒🏾", first: 19660, episodes: 55 }); await add({ title: "Rugrats ≈ راجراتس 🧒🏾", first: 15131, episodes: 29 }); await add({ title: "Sinbad ≈ مغامرات سندباد 🧒🏾", first: 9254, episodes: 52 }); await add({ title: "Sonic X ≈ سونيك أكس 🧒🏾", first: 8304, episodes: 52 }); await add({ title: "Three Bears ≈ الدببة الثلاثة 🧒🏾", first: 27648, episodes: 25 }); await add({ title: "Women in the Quran ≈ قصص النساء في القرآن 🧒🏾", first: 13675, episodes: 30 }); await add({ title: " Digimon ≈ أبطال الديجيتال الجزء 1", first: 3664, episodes: 54 }); await add({ title: " Dragonball Super ≈ دراغون بول سوبر", first: 32647, episodes: 130 }); await add({ title: " Dragonball Z Kai ≈ دراغون بول زد كاي", first: 11587, episodes: 54 }); await add({ title: " Dragonball ≈ دراغون بول", first: 9651, episodes: 52 }); // Overflows onto other shows after ep17 await add({ title: " Powerpuff Girls ≈ فتيات القوة", first: 10233, episodes: 53 }); await add({ title: " Samurai ≈ ساموراي 7", first: 11311, episodes: 26 }); await add({ title: " SpongeBob ≈ سبونج بوب", first: 14773, episodes: 20 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); await add({ title: "NEW ≈ القرآن", first: 13675, episodes: 30 }); // sanity check shows_exploded.length shows_exploded.at(-1).title fs.writeFile('../shows.json', JSON.stringify(shows_exploded, null, 2), (err) => { if (err) throw err; console.log('Data written to file'); });
:End:
What is this page for?
What is this page for?
I found a website that lets us watch Arabic cartoons.
- Sadly, it is “too busy” for use with a child —and, actually “too busy” for me as a parent. It has too much content: Other shows, comments, ads, etc.
- As such, I've made this little Web App to use for my kids when watching Dora.
Every time you refresh this page, a random episode from a random show is selected. Moreover, there's also show & episode selectors for use.
Life & Computing Science by Musa Al-hassy is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License