Sfoglia il codice sorgente

Merge pull request #207 from BryghtShadow/patch-1 [ci-skip]

fix example: wrap dict.values in list()
tags/v0.5.2
Ben Kurtovic 5 anni fa
committed by GitHub
parent
commit
02151e24f7
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      README.rst

+ 1
- 1
README.rst Vedi File

@@ -189,7 +189,7 @@ Python 3 code (via the API_)::
"rvprop": "content", "format": "json", "titles": title}
raw = urlopen(API_URL, urlencode(data).encode()).read()
res = json.loads(raw)
text = res["query"]["pages"].values()[0]["revisions"][0]["*"]
text = list(res["query"]["pages"].values())[0]["revisions"][0]["*"]
return mwparserfromhell.parse(text)

.. _MediaWiki: http://mediawiki.org


Caricamento…
Annulla
Salva