Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ibrahimmudassar/the-morning
Access The New York Times daily for the Morning Newsletter
https://github.com/ibrahimmudassar/the-morning
automation discord embed newsletter newyorktimes opengraphprotocol playwright-python requests-html rest-api scheduled-tasks webhook-api
Last synced: 10 days ago
JSON representation
Access The New York Times daily for the Morning Newsletter
- Host: GitHub
- URL: https://github.com/ibrahimmudassar/the-morning
- Owner: ibrahimmudassar
- Created: 2021-07-26T04:58:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T23:31:45.000Z (7 months ago)
- Last Synced: 2024-04-14T13:10:20.162Z (7 months ago)
- Topics: automation, discord, embed, newsletter, newyorktimes, opengraphprotocol, playwright-python, requests-html, rest-api, scheduled-tasks, webhook-api
- Language: Python
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The-Morning
![Embed Example](https://github.com/ibrahimmudassar/The-Morning/assets/22484328/67dca18f-7c29-4f53-96b1-b3cc037953b1)
I wanted to create a bot that would automatically send me The Morning Newsletter from The New York Times to my Discord Server.
Scrapes using requests_html and deployed using GitHub Actions.
This code works with Restful APIs as well, just comment out the discord specific function.
#### Warning!
This code is not going to work unless you define a couple environment variables. This can be done a couple of ways:- Control Panel > Advanced System Settings > Advanced > Environment Variables
- Create a .env file in the folder and define the required environment variables thereIf you are using discord embeds you will need to define a WEBHOOKS variable as such:
WEBHOOKS=exampleapi.discord.com,exampleapi.discord.com## RESTful APIs
I have a function set up and its implementation is for my Amazon Alexa. You only need to change the url as the function just uses a post request.