aboutsummaryrefslogtreecommitdiff
path: root/scripts/dictionary/step-01-download-rfc.py
blob: 04f9cccc7db8c054982b44524fb18aed46a3dd8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)