Path: ...!news.mixmin.net!aioe.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!agneau.org!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed1-a.proxad.net!nnrp1-1.free.fr!not-for-mail From: Valrik Newsgroups: fr.comp.lang.python Subject: Re: Tentative de transcription d'une ligne de commande =?utf-8?Q?=C2=AB?= Curl =?utf-8?B?wrsgw6A=?= l'aide de =?utf-8?Q?=C2=AB?= urllib3 =?utf-8?Q?=C2=BB=2E?= References: <87lezbntpp.fsf@s02.forall> <87h79ypbeo.fsf@universite-de-strasbourg.fr.invalid> <87czkmlz0p.fsf@s02.forall> <878rv9n80y.fsf@s02.forall> Date: Sat, 05 Feb 2022 00:28:13 +0100 Message-ID: <87k0eafbzm.fsf@s02.forall> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cancel-Lock: sha1:H7TRPNOzXc4jABrS6nCiVp29/14= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Lines: 36 Organization: Guest of ProXad - France NNTP-Posting-Date: 05 Feb 2022 00:28:13 CET NNTP-Posting-Host: 91.172.153.64 X-Trace: 1644017293 news-2.free.fr 29475 91.172.153.64:57770 X-Complaints-To: abuse@proxad.net Bytes: 2493 Valrik writes: > Bon j'ai fini par trouver ! :-)) > > Il fallait =C2=AB =C3=A9chapper =C2=BB les =C2=AB \n, ", \t =C2=BB et aut= res joyeuset=C3=A9s avec un =C2=AB > \ =C2=BB. Cela donne : > > data_binary=3D'{\"query\":\"{\\n diffusionsOfShowByUrl(url: > \\"https://www.franceculture.fr/emissions/fictions-theatre-et-cie\\", > first: 10) {\\n\\t edges {\\n cursor\\n node {\\n > id\\n title\\n url\\n published_date\\n > podcastEpisode {\\n url\\n title\\n }\\n > }\\n }\\n }\\n}\"}' > > puis au c=C5=93ur de la requ=C3=AAte : > > r =3D http.request( > 'POST', # Ton intuition =C3=A9tait la bonne ! > 'https://openapi.radiofrance.fr/v1/graphql?x-token=3Db0b8d190-44b8-44= 9f-b3fc-62cf10d3c461', > body=3D data_binary, # =C2=AB body=3D =C2=BB, trouv=C3=A9 dans la doc= .. D=C3=A9j=C3=A0 utilis=C3=A9, mais mal. > headers=3D{=E2=80=A6 > > =C3=87a devrait aller mieux maintenant=E2=80=A6 jusqu'=C3=A0 la prochaine= difficult=C3=A9. ;-) > > > Merci encore. Ya encore plus simple en fait : il suffit de formater la requ=C3=AAte en = =C2=AB raw =C2=BB. Ex : data_binary=3D r'{"query":"{\n brands {\n title\n description\n}\n}= \n"}'