Trending Machine Learning topics for Alexa
Structure

Nothing! The code seems fairly straightforward and clear, and I was able to understand what you’re doing even if I didn't study flask too much. So I don’t think there’s anything wrong with the structure.

Code style

One small nitpick: some of your lines are too long (>79 characters). From PEP8:


  Limit all lines to a maximum of 79 characters.


Anyway, as a personal preference, I like to stick to PyCharm's recommendation and keep it &lt; 120. But even with that in mind, you still have one line which doesn't fit.

Do this instead (for &lt;120):

session.headers = {
    "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) "
                  "Chrome/59.0.3071.115 Safari/537.36"
}


Or:

session.headers = {
        "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5)" 
                      "AppleWebKit/537.36 (KHTML, like Gecko) "
                      "Chrome/59.0.3071.115 Safari/537.36"
    }


Anyway, that's really subjective and it didn't bother me that you kept the entire User-Agent on the same line.

The same observation is also applicable for updateDate.



Flask-RESTful API

Apparently, you're trying to create some sort of RESTful API. Luckily, flask let's you do this by installing their Flask-RESTful API which you can do by running pip install flask-restful.

Flask-RESTful is a powerful extension for Flask that was designed to help you build complex RESTful APIs. It follows similar design principles to Flask so it is really easy (IMO) to pick up. Now, you might wonder why you should use this: well, your code was quite straightforward to implement but as the API grows in complexity it is easy to see this code becoming very complicated, very quickly!