Skip to content

Instantly share code, notes, and snippets.

@VieVie31
Last active July 14, 2021 11:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VieVie31/5b73673c95b366317ebeea9deb7138ce to your computer and use it in GitHub Desktop.
Save VieVie31/5b73673c95b366317ebeea9deb7138ce to your computer and use it in GitHub Desktop.
download PIERRE-EMMANUEL BARRÉ podcasts on france inter
curl "https://media.radiofrance-podcast.net/podcast09/13939-12.04.2017-ITEMA_21289880-4.mp3" > "La drôle dhumeur de Pierre-Emmanuel Barré.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/14212-29.03.2017-ITEMA_21274987-0.mp3" > "La campagne électorale va trop vite.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/14212-22.03.2017-ITEMA_21267521-0.mp3" > "France Inter, radio bolchévique.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/14212-15.03.2017-ITEMA_21260072-0.mp3" > "Dignité, tu mauras pas ?.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/15275-08.03.2017-ITEMA_21253600-14.mp3" > "Qui survivra à lapocalypse ?.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/15275-01.03.2017-ITEMA_21246201-14.mp3" > "Le programme de Macron.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-22.02.2017-ITEMA_21237840-6.mp3" > "Le débat politique à la télé, pourquoi faire ?.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-08.02.2017-ITEMA_21223115-6.mp3" > "Cest une maison darrêt.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/14212-01.02.2017-ITEMA_21215541-0.mp3" > "Le grand ménage politique.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-24.01.2017-ITEMA_21206978-6.mp3" > "Et pendant ce temps, dans les abattoirs.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/14212-18.01.2017-ITEMA_21200866-0.mp3" > "Emmanuel Macron, lhomme qui envoûte la France.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/14212-11.01.2017-ITEMA_21193662-0.mp3" > "Gang bang socialiste.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/15275-04.01.2017-ITEMA_21187478-14.mp3" > "Longue vie à Manuel Valls.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/15275-28.12.2016-ITEMA_21180421-14.mp3" > "Sarko, le bilan.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-22.12.2016-ITEMA_21173446-6.mp3" > "Parlons de rien !.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-14.12.2016-ITEMA_21165205-6.mp3" > "Les banquiers sous acides.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/15275-07.12.2016-ITEMA_21159155-13.mp3" > "Les primaires ridicules.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/15275-30.11.2016-ITEMA_21152233-13.mp3" > "Le réformé Cambadélis.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-24.11.2016-ITEMA_21145525-6.mp3" > "Le Grand débat.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-16.11.2016-ITEMA_21137407-6.mp3" > "Au Congo cest pas la fête.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-09.11.2016-ITEMA_21130484-6.mp3" > "Fichés bien profond !.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-02.11.2016-ITEMA_21122898-6.mp3" > "France Inter vous ment !.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/14212-26.10.2016-ITEMA_21115856-0.mp3" > "Policiers et citoyens, donnons nous la main.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/14212-19.10.2016-ITEMA_21109071-0.mp3" > "Le pays des gros.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/14212-12.10.2016-ITEMA_21102268-0.mp3" > "Les migrants volent le travail de nos clochards.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/15275-05.10.2016-ITEMA_21096357-13.mp3" > "Juppé, le trou de la sécu.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-28.09.2016-ITEMA_21088878-6.mp3" > "Sarko, le bilan.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-21.09.2016-ITEMA_21082237-6.mp3" > "Bayer - Monsanto, cest la santé.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-14.09.2016-ITEMA_21075691-6.mp3" > "Les arbres sacrifiés pour Zemmour.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/15275-07.09.2016-ITEMA_21070093-13.mp3" > "2017 : des candidats chauds bouillants.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/13939-31.08.2016-ITEMA_21062793-7.mp3" > "Racisme et handicap.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/14212-24.06.2016-ITEMA_21018315-0.mp3" > "Cest toujours la même merde !.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/14215-20.06.2016-ITEMA_21014305-0.mp3" > "Drole dhumeur de Pierre Emmanuel Barré.mp3"
curl "https://media.radiofrance-podcast.net/podcast09/15275-17.06.2016-ITEMA_21012967-7.mp3" > "Game of France.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/06/s22/net-fi-9c7bfc8b-1fd1-4a5e-8d7e-d3e06c18d2ce.mp3" > "Daech et la CGT.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/05/s21/net-fi-f9915ecd-6b37-43ec-af31-cc029d55580c.mp3" > "Cest la faute à Manu.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/05/s20/net-fi-f0e7f027-83f4-46f0-ab1c-fe785fdd7519.mp3" > "Nagui est vivant !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/05/s19/net-fi-b9835999-2177-40ba-8946-7d85760074e7.mp3" > "Les armes, cest super !.mp3"
curl "http://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/0000/14212-06.05.2016-ITEMA_20978940-0.mp3" > "Bas les masques.mp3"
curl "http://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/04/s16/net-fi-16d169d9-3435-4c80-ba0d-6ede0331d37e.mp3" > "Macron est tellement de droite on dirait Michel Sardou qui a mangé Donald Trump !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/04/s15/net-fi-9208a94c-3db1-4ec3-9e62-d3614e63ba21.mp3" > "Contre-feu à voile ou en barrettes.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/04/s14/net-fi-b53e1f10-778b-491d-b1aa-da1a97a02333.mp3" > "Macron en marche, vas-y pars devant (on t’rejoint ) !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/0000/14212-28.03.2016-ITEMA_20947330-0.mp3" > "Le mystère des oeufs de pâques.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/03/s12/net-fi-facbbb25-f28b-4a1d-abf0-9fd5494707d7.mp3" > "Cest la guèèèèèèrre !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/03/s11/net-fi-deaaf8a4-e235-43ed-98d1-ecd288429f18.mp3" > "Les tampons toxiques, la drôle dhumeur de Pierre-Emmanuel Barré.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/03/s10/net-fi-115aadb0-78e2-4402-bb89-9c06775c0336.mp3" > "Légion de déshonneur.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/03/s09/net-fi-4a85bcb6-a1e8-41fc-aca1-b2917665476e.mp3" > "La révolution, Hasta Siempre.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/0000/14212-26.02.2016-ITEMA_20922895-0_0.mp3" > "Les agriculteurs se font b....mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/02/s07/net-fi-d78887f2-30ab-4454-8b18-d5b40917b9ab.mp3" > "Nicolas Sarkozy passe plus de temps au tribunal quun juge.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/02/s06/net-fi-bdacf413-2a22-42d5-8ac6-d840076ad53f.mp3" > "Réforme de lorthographe : député devient depute.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/02/s05/net-fi-987db129-a1d4-4e47-b889-26e6b4f1c892.mp3" > "Nos amis les vieux ! La drôle dhumeur de Pierre-Emmanuel Barré.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/01/s04/net-fi-ca5cd46e-dc98-4618-b9f5-528929eb5aef.mp3" > "Hassan Rohani cest super.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/01/s03/net-fi-cba6cada-fce5-40eb-8138-8331bb3ce7f4.mp3" > "Bienvenue au chômistan.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/01/s02/net-fi-b3f37d46-76ce-4fe1-9f08-0c0724fb9d47.mp3" > "Montée de racisme.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2016/01/s01/net-fi-df529d7d-3ee3-45a9-bc38-c4f2ce004eba.mp3" > "Joyeux anniversaire les attentats.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/0000/14212-25.12.2015-ITEMA_20873242-0.mp3" > "Pierre-Emmanuel Barré.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/12/s51/net-fi-fcea29ed-c206-4fe1-a192-84f2b3002cf8.mp3" > "Je suis venu en vagin.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/12/s50/net-fi-ccbbe683-4303-435e-90f7-d7e8dcaac346.mp3" > "Manu en roue libre !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/12/s49/net-fi-c034dc59-d3a3-4d5b-8313-25910cb41157.mp3" > "La cop21, cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/11/s48/net-fi-3748114d-c8b8-4c0c-ad92-1c08bb448806.mp3" > "La bombe à coq, spécialité française.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/11/s47/net-fi-0cdc424c-7fb5-4250-acc8-0f7545393ddb.mp3" > "Pierre-Emmanuel Barré.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/11/s46/net-fi-193abd4b-da57-4643-964d-60e461f13419.mp3" > "Dernière journée avec le jackpot !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/11/s45/net-fi-263dadce-8d7b-4aa3-936d-0b9211d256c2.mp3" > "Halloween, c’est super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/10/s43/net-fi-ea63eba5-93fe-4562-a26f-57ed6cf3a8b8.mp3" > "A nos amis les réfugiés....mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/10/s42/net-fi-660a4137-bda2-47bc-adca-c46b10a63691.mp3" > "Hasta Siempre !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/10/s41/net-fi-295992a0-2381-4f1d-ac5b-3c5e3cc658cd.mp3" > "La fin du monde, cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/09/s40/net-fi-3855a4db-6a1c-4503-9077-4a6ced6842c7.mp3" > "Lécologie cest super !.mp3"
curl "http://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/09/s39/net-fi-f93de2f6-7172-414c-be7a-ccc2fc01aa66.mp3" > "La guerre cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/09/s38/net-fi-7b184cfb-804a-43a6-92db-895f9932fc1c.mp3" > "La maladie dAlzheimer, cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/08/s36/net-fi-417cda38-f02e-4a1e-adbd-38cbabf05238.mp3" > "Mauvaise nouvelle pour les élèves, bonne nouvelle pour les pédophiles, demain, cest la rentrée.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/08/s35/net-fi-b4f6a072-eec7-4e93-80de-c8e27cac2a09.mp3" > "Les Alcooliques Anonnymes, si ça fonctionnait, ils se souviendraient de leur nom.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/06/s25/net-fi-2b521f66-595b-4db0-a647-e2a169d2b1ba.mp3" > "Les vagins, cest super !!.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/06/s24/net-fi-8d910810-9448-4e52-968b-7edcbefea793.mp3" > "Lalcool cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/06/s23/net-fi-e1aa45fd-de6d-4536-a37f-37f28b0be7f6.mp3" > "La frangipane, cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/05/s22/net-fi-da12181f-fb47-4d62-b920-3f0a2529f199.mp3" > "La guerre nucléaire cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/05/s21/net-fi-576f3197-311a-4168-97bb-40c194fca5c8.mp3" > "Le Festival de Cannes, cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/05/s19/net-fi-c49d0cb0-9ad6-4671-aa36-46a7ce2371f5.mp3" > "La colonisation cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/04/s17/net-fi-447ae8dd-daf2-4062-b56e-d4b9b125f616.mp3" > "Limmigration, cest super!.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/04/s16/net-fi-03895962-54d6-4aa9-b6cb-983564011ffb.mp3" > "La France en 2040, cest super !.mp3"
curl "http://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/03/s13/net-fi-9110ad0d-0fcd-4459-8909-8a4f80bcf017.mp3" > "Les gros, cest super!.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/03/s12/net-fi-e3b2241a-5395-43f6-90b1-7451b2706240.mp3" > "La Saint-Patrick, cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/03/s10/net-fi-f015198a-2019-4e5c-9f35-2f403b51b8e5.mp3" > "Leau cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/02/s09/net-fi-eac64b73-7c07-46b3-bb36-ad136efdbdc8.mp3" > "Les filles, cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/0000/14212-17.02.2015-ITEMA_20724533-0.mp3" > "La délation, cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/02/s07/net-fi-d0df6ec7-c94b-42a8-86cf-5adc02fa9d5c.mp3" > "Lévasion fiscale, cest super !.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/02/s06/net-fi-acb775ff-905b-4ace-9faf-958da46038de.mp3" > "Si on retire la nationalité à tous les gens qui nuisent à la France, on va finir avec un gouvernement de sans-papiers.mp3"
curl "http://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/01/s05/net-fi-d539654e-14f2-4fe6-ac49-0c95eabe8032.mp3" > "Davos, what else?.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/01/s04/net-fi-5017edc2-450b-44b9-b240-b0e64100187b.mp3" > "Sil fallait être courageux pour être français, ça fait longtemps quon maurait reconduit à la frontière....mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/01/s03/net-fi-06c6ad8e-00dc-4d25-84b5-4f04d261853f.mp3" > "drôle d humeur Emmanuel Barré.mp3"
curl "https://s3-eu-west-1.amazonaws.com/cruiser-production/static/inter/sons/2015/01/s02/net-fi-88cdc585-6096-46bd-8170-5fe6c41b305b.mp3" > "Pierre-Emmanuel Barré.mp3"
from functools import reduce
from requests import get
from lxml import html
url_base = "https://www.franceinter.fr/emissions/la-drole-d-humeur-de-pierre-emmanuel-barre" #"https://www.franceinter.fr/emissions/la-drole-d-humeur-de-pierre-emmanuel-barre/archives-29-08-2016-30-06-2017"
r = get(url_base)
tree = html.fromstring(r.text)
nb_pages = int(tree.xpath('//*[@id="content"]/section/div[2]/div/div/div[2]/ul[1]/li[last()]/a/@href')[0].split('=')[-1])
def get_mp3_link(podcast_link):
print('.', end='', flush=True)
t = html.fromstring(get(podcast_link).text)
return (
t.xpath('//*[@id="content"]/div[4]/div[1]/div/div[2]/div[2]/div[2]/button/@data-url'), #return url
t.xpath('//*[@id="content"]/div[4]/div[1]/div/div[2]/div[2]/h1/text()')[0].strip().replace('"', '').replace("'", '') #return name
)
s = ""
for p in range(1, nb_pages + 1):
#get the page
r = get(url_base + '?p=' + str(p))
tree = html.fromstring(r.text)
print('page : ' + str(p), flush=True)
#extract links of individual podcats
podcasts_links = tree.xpath('//*[@id="content"]/section/div[2]/div/div/div[1]//section/article[*]/div/div[2]/div[2]/header/div/a/@href')
#extract mp3 links
mp3_links = list(map(get_mp3_link, podcasts_links))
#prepare the download command (curl)
for url, name in mp3_links:
try:
s += 'curl "' + url[0] + '" > "' + name + '.mp3"' + chr(10)
except:
pass
print(' OK', flush=True)
f = open('download.sh', 'w')
f.write(s)
f.close()
print(chr(10) + "Run 'download.sh' to download all mp3...")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment