Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > fr.comp.lang.python > #3712
| Path | csiph.com!news.mixmin.net!aioe.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!agneau.org!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed3-a.proxad.net!nnrp1-1.free.fr!not-for-mail |
|---|---|
| From | Valrik <nospam@valrik.invalid> |
| Newsgroups | fr.comp.lang.python |
| Subject | Re: Tentative de transcription d'une ligne de commande « Curl » à l'aide de « urllib3 ». |
| References | <87lezbntpp.fsf@s02.forall> <87h79ypbeo.fsf@universite-de-strasbourg.fr.invalid> <87czkmlz0p.fsf@s02.forall> |
| Date | Fri, 21 Jan 2022 03:21:17 +0100 |
| Message-ID | <878rv9n80y.fsf@s02.forall> (permalink) |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
| Cancel-Lock | sha1:ThEGOc+Cdl7aJYbJ9b+Mgt8x9fg= |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | quoted-printable |
| Lines | 30 |
| Organization | Guest of ProXad - France |
| NNTP-Posting-Date | 21 Jan 2022 03:21:18 CET |
| NNTP-Posting-Host | 91.172.153.64 |
| X-Trace | 1642731678 news-2.free.fr 20273 91.172.153.64:51572 |
| X-Complaints-To | abuse@proxad.net |
| Xref | csiph.com fr.comp.lang.python:3712 |
Show key headers only | View raw
Bon j'ai fini par trouver ! :-))
Il fallait « échapper » les « \n, ", \t » et autres joyeusetés avec un «
\ ». Cela donne :
data_binary='{\"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œur de la requête :
r = http.request(
'POST', # Ton intuition était la bonne !
'https://openapi.radiofrance.fr/v1/graphql?x-token=b0b8d190-44b8-449f-b3fc-62cf10d3c461',
body= data_binary, # « body= », trouvé dans la doc. Déjà utilisé, mais mal.
headers={…
Ça devrait aller mieux maintenant… jusqu'à la prochaine difficulté. ;-)
Merci encore.
Back to fr.comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
Tentative de transcription d'une ligne de commande « Curl » à l'aide de « urllib3 ». Valrik <nospam@valrik.invalid> - 2022-01-20 01:20 +0100
Re: Tentative de transcription d'une ligne de commande « Curl » à l'aide de « urllib3 ». Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> - 2022-01-20 18:25 +0100
Re: Tentative de transcription d'une ligne de commande « Curl » à l'aide de « urllib3 ». Valrik <nospam@valrik.invalid> - 2022-01-21 01:21 +0100
Re: Tentative de transcription d'une ligne de commande « Curl » à l'aide de « urllib3 ». Valrik <nospam@valrik.invalid> - 2022-01-21 03:21 +0100
Re: Tentative de transcription d'une ligne de commande « Curl » à l'aide de « urllib3 ». Valrik <nospam@valrik.invalid> - 2022-02-05 00:28 +0100
csiph-web