Getting data out of a Python (.py) file is difficult, so I decided to use JSON instead.
The files are named trend-data-1.json, trend-data-2.json, and so on. These are intermediate saved files, which add new data as the number goes up. That is, every file contains everything in trend-data-1.json, every file except trend-data-1.json contains everthing in trend-data-2.json, and so on. They are saved every half-hour starting from 12:20, so by 10am there should be about 20 of them. The trend list is generated every 30 seconds.
To turn the file trend-data-19.json into a Python list, copy it to be in the same folder as the credentials.py and *.ipynb files. Then use:
# be careful about indentation, the indentation of these lines # should match that of the preceding lines. import json with open("trend-data-19.json") as f: db = json.load(f)
Sometimes the function to get the trends fails. For this reason, the length of the database will probably not be an even multiple of 50.