Hold-Krykke / PythonExam

4. Semester Python Eksamens Projekt
1 stars 1 forks source link

Flask Service #13

Closed MrHardcode closed 4 years ago

MrHardcode commented 4 years ago

Experimental branch with one hardcoded example of how to make the flask server work Working on a proper setup of the flask server on this branch now

MrHardcode commented 4 years ago

I've made some mistakes so don't merge anything

MrHardcode commented 4 years ago

Plotting still seems to be bugged - check out this

Plot was created with the following request data:

{
    "hashtags": [
        "trump",
        "biden"
    ],
    "start_date": "2020-5-3",
    "end_date": "2020-5-12",
    "plot_type": "line",
    "search_for": {"mentions": "@JoeBiden"}
}
MrHardcode commented 4 years ago

Should the amount of tweets scraped be an option or should we just always scrape 500 as standard? (would get more older tweets). I vote for the hardcoded option of course

Castau commented 4 years ago

Either could be an option. For the purpose of the project it's fine to limit it to a specific amount :)

MalteMagnussen commented 4 years ago

Should the amount of tweets scraped be an option or should we just always scrape 500 as standard? (would get more older tweets). I vote for the hardcoded option of course

Depends how long it takes? If it takes barely any time to scrape, lets say, 2000 tweets, compared to 500, then why not let user do that? (Hardcoded option) If its easy to up the amount of tweets scraped, then it should also be relatively straightforward to let user pass a body parameter to take more. Default 500, if no parameter set by user in JSON body?

MrHardcode commented 4 years ago

Okay let's make a default at 300 (takes ca. 10 seconds) and let the user change the amount

MrHardcode commented 4 years ago

Okay now you have the option of controlling the web scraper image