Skip to content

patch(report_news): added tericcabrel blog as source#127

Open
pythonbrad wants to merge 2 commits into
osscameroon:mainfrom
pythonbrad:patch_tericcabrel
Open

patch(report_news): added tericcabrel blog as source#127
pythonbrad wants to merge 2 commits into
osscameroon:mainfrom
pythonbrad:patch_tericcabrel

Conversation

@pythonbrad

Copy link
Copy Markdown
Member

Related issues

Preview

Screenshot from 2024-11-07 23-36-07

Change

Added the tericcabrel's blog as source

@pythonbrad pythonbrad changed the title report_news: added tericcabrel blog as source patch(report_news): added tericcabrel blog as source Nov 7, 2024
Comment thread .github/workflows/report_news/main.py Outdated
xml_raw = ET.fromstring(body)
articles = []

for url in xml_raw.findall('{http://www.sitemaps.org/schemas/sitemap/0.9}url')[-MAX_ARTICLES:]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like restraining it to MAX_ARTICLES, would make us skip a bunch of articles published on that blog. Maybe we can have an upper limit of 100 ? The MAX_ARTICLES is the maximum amount of article we want to publish on the telegram message, not the max of articles we want to choose from.

@pythonbrad pythonbrad Nov 10, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rakici

The sitemap contains a huge amount of articles. Parse all these articles to extract their content will take time and can overload the server.

It's why I opted to take the last n articles.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense howerver, I still want us be drawing from a bigger set of articles than 10, as this can make us skip during an initial run on a blog that has more 10 articles, potential interesting articles.

The articles are listed from latest to oldest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants