diff options
Diffstat (limited to 'scripts/dictionary/step-01-download-rfc.py')
-rw-r--r-- | scripts/dictionary/step-01-download-rfc.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/dictionary/step-01-download-rfc.py b/scripts/dictionary/step-01-download-rfc.py new file mode 100644 index 0000000..14f65cc --- /dev/null +++ b/scripts/dictionary/step-01-download-rfc.py @@ -0,0 +1,16 @@ +# Step 01 - download RFC7932. +# +# RFC is the ultimate source for brotli format and constants, including +# static dictionary. + +import urllib2 + +response = urllib2.urlopen('https://tools.ietf.org/rfc/rfc7932.txt') + +text = response.read() +path = "rfc7932.txt" + +with open(path, "w") as rfc: + rfc.write(text) + +print("Downloaded and saved " + str(len(text)) + " bytes to " + path) |