You are already feeling this change in yourself... You can now understand why people say that developers are lazy. You want to do more, but doing less. That's normal.
Let's try to enhance your own routine, as a starter. Every morning you do the same researches to stay aware and prepared for your new day. We're gonna save this precious time.
To do so, we're going to create a script that automate this researches by simulate it in a browser, get the informations you want, and display it all gathered in the console.
To begin, let's try to enhance your own routine. Every morning you do the same researches to stay aware and be prepared for your new day. We're going to save this precious time.
To do so, we're going to create a script which automates this researches by simulating them in a browser, get the informations you want, and display them all gathered in the console.
> We are talking here about your own interests. This can be found only in youself. What's relevant to you to begin a new day? It is very personnal, be creative!
> We are talking here about your own interests. This can be found only in yourself. What's relevant to you to begin a new day? It is very personnal, be creative!
> Some examples we could see in other people minds: get the weather, the last podcast/article of a media that you like, the last post of a someone/something you follow, your horoscope, the tv program of the day, etc.
About the browser control, you must:
- handle the opening and the closure of the browser
- navigate to a specific url
- click on an element which implies an event in the page (display something, registrer to something, like something...)
- click on an element which implies an event in the page (display something, register to something, like something...)
- navigate in a website
- get the text content of an element
- get the url of an element
In the end:
- The whole browser control must execute itself without being seen.
- Your ephemeris must appear in your console.
- Your `ephemeris` must appear in your console.
- The script has to finish and close properly.
#### Using puppeteer
In order to get your daily informations out of your favorite websites, you'll have to use `puppeteer` API.
In order to get your daily informations out of your favorite websites, you'll have to use the `puppeteer` API.
First, create a new repository named `ephemeris` and run this command line in your terminal, in the repository: