Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(route): add route for BBC Twitter accounts #15275

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

danilo-delbusso
Copy link

@danilo-delbusso danilo-delbusso commented Apr 17, 2024

Involved Issue / 该 PR 相关 Issue

N/A

Example for the Proposed Route(s) / 路由地址示例

/twitter/bbc-user/BBCBreaking
/twitter/bbc-user/BBCWorld
/twitter/bbc-user/BBCNews
/twitter/bbc-user/BBCNewsAsia
/twitter/bbc-user/BBCAfrica
/twitter/bbc-user/BBCBusiness
/twitter/bbc-user/BBCLondonNews
/twitter/bbc-user/BBCNorthAmerica
/twitter/bbc-user/BBCSport

New RSS Route Checklist / 新 RSS 路由检查表

  • New Route / 新的路由
  • Anti-bot or rate limit / 反爬/频率限制
    • If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
  • Date and time / 日期和时间
    • Parsed / 可以解析
    • Correct time zone / 时区正确
  • New package added / 添加了新的包
  • Puppeteer

Note / 说明

Reason for adding route

BBC Twitter accounts may contain feeds different from those available on bbc.co.uk or similar.

For instance, the Breaking News feed on Twitter contains fewer posts and is more relevant for just major news.

Based on existing routes

This route uses Twitter Feed fetched from matching BBC accounts, and then uses the existing BBC route to fetch the articles and add their content on the description, which avoids having to open the URLs. It also makes use of the twitter/user route as a base route to fetch the tweets in the first place.

Note this only works on BBC Twitter accounts that posts BBC Articles, such as twitter.com/BBCBreaking, twitter.com/BBCNews, twitter.com/BBCWorld, etc. More can be seen here: https://twitter.com/search?q=BBC&f=user

BBC Twitter accounts may contain feeds different from those available on bbc.co.uk or similar.

For instance, the Breaking News feed on Twitter contains fewer posts and is more relevant for just major news.

This route uses Twitter Feed fetched from BBC articles, and then uses the existing BBC route to fetch the articles and add their content on the `description`, which avoids having to open the URLs. It also makes use of the `twitter/user` route as a base route to fetch the tweets in the first place.
Copy link
Contributor

Successfully generated as following:

http://localhost:1200/twitter/bbc-user/BBCBreaking - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCBreaking</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>
http://localhost:1200/twitter/bbc-user/BBCWorld - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCWorld</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>
http://localhost:1200/twitter/bbc-user/BBCNews - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCNews</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>

@github-actions github-actions bot added the Auto: Route Test Complete Auto route test has finished on given PR label Apr 17, 2024
Copy link
Contributor

Successfully generated as following:

http://localhost:1200/twitter/bbc-user/BBCBreaking - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCBreaking</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>
http://localhost:1200/twitter/bbc-user/BBCWorld - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCWorld</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>
http://localhost:1200/twitter/bbc-user/BBCNews - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCNews</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>

Copy link
Contributor

Successfully generated as following:

http://localhost:1200/twitter/bbc-user/BBCBreaking - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCBreaking</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>
http://localhost:1200/twitter/bbc-user/BBCWorld - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCWorld</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>
http://localhost:1200/twitter/bbc-user/BBCNews - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCNews</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>
http://localhost:1200/twitter/bbc-user/BBCNewsAsia - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCNewsAsia</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>
http://localhost:1200/twitter/bbc-user/BBCAfrica - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCAfrica</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>
http://localhost:1200/twitter/bbc-user/BBCBusiness - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCBusiness</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>
http://localhost:1200/twitter/bbc-user/BBCLondonNews - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCLondonNews</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>
http://localhost:1200/twitter/bbc-user/BBCNorthAmerica - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCNorthAmerica</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>
http://localhost:1200/twitter/bbc-user/BBCSport - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/><code class="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">ConfigNotFoundError: Twitter API is not configured</code>
Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/:id/:routeParams?</code>
Full Route: <code class="ml-2 bg-zinc-100">/twitter/bbc-user/BBCSport</code>
Node Version: <code class="ml-2 bg-zinc-100">v21.7.3</code>
Git Hash: <code class="ml-2 bg-zinc-100">eb2a6028</code>

@danilo-delbusso
Copy link
Author

Locally seems to work just fine - I assume all the 503 errors here are related to Twitter API / request limitations? Someone more knowledgeable might know

Copy link
Contributor

This PR is stale because it has been opened for more than 3 weeks with no activity. Comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale No feedback from OP label May 12, 2024
@danilo-delbusso
Copy link
Author

keep alive please

@github-actions github-actions bot removed the Stale No feedback from OP label May 13, 2024
Copy link
Contributor

github-actions bot commented Jun 6, 2024

This PR is stale because it has been opened for more than 3 weeks with no activity. Comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale No feedback from OP label Jun 6, 2024
@danilo-delbusso
Copy link
Author

alive

Copy link
Contributor

Successfully generated as following:

http://localhost:1200/twitter/bbc-user/BBCBreaking - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/bbc-user/:id/:routeParams?
Full Route: /twitter/bbc-user/BBCBreaking
Node Version: v22.2.0
Git Hash: e943fd30
http://localhost:1200/twitter/bbc-user/BBCWorld - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/bbc-user/:id/:routeParams?
Full Route: /twitter/bbc-user/BBCWorld
Node Version: v22.2.0
Git Hash: e943fd30
http://localhost:1200/twitter/bbc-user/BBCNews - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/bbc-user/:id/:routeParams?
Full Route: /twitter/bbc-user/BBCNews
Node Version: v22.2.0
Git Hash: e943fd30
http://localhost:1200/twitter/bbc-user/BBCNewsAsia - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/bbc-user/:id/:routeParams?
Full Route: /twitter/bbc-user/BBCNewsAsia
Node Version: v22.2.0
Git Hash: e943fd30
http://localhost:1200/twitter/bbc-user/BBCAfrica - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/bbc-user/:id/:routeParams?
Full Route: /twitter/bbc-user/BBCAfrica
Node Version: v22.2.0
Git Hash: e943fd30
http://localhost:1200/twitter/bbc-user/BBCBusiness - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/bbc-user/:id/:routeParams?
Full Route: /twitter/bbc-user/BBCBusiness
Node Version: v22.2.0
Git Hash: e943fd30
http://localhost:1200/twitter/bbc-user/BBCLondonNews - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/bbc-user/:id/:routeParams?
Full Route: /twitter/bbc-user/BBCLondonNews
Node Version: v22.2.0
Git Hash: e943fd30
http://localhost:1200/twitter/bbc-user/BBCNorthAmerica - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/bbc-user/:id/:routeParams?
Full Route: /twitter/bbc-user/BBCNorthAmerica
Node Version: v22.2.0
Git Hash: e943fd30
http://localhost:1200/twitter/bbc-user/BBCSport - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/bbc-user/:id/:routeParams?
Full Route: /twitter/bbc-user/BBCSport
Node Version: v22.2.0
Git Hash: e943fd30

@danilo-delbusso
Copy link
Author

not stale

@github-actions github-actions bot removed the Stale No feedback from OP label Jun 11, 2024
Copy link
Contributor

github-actions bot commented Jul 5, 2024

This PR is stale because it has been opened for more than 3 weeks with no activity. Comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale No feedback from OP label Jul 5, 2024
@danilo-delbusso
Copy link
Author

Not stale

@github-actions github-actions bot removed the Stale No feedback from OP label Jul 7, 2024
Copy link
Contributor

This PR is stale because it has been opened for more than 3 weeks with no activity. Comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale No feedback from OP label Jul 31, 2024
@danilo-delbusso
Copy link
Author

not stale

@github-actions github-actions bot removed the Stale No feedback from OP label Aug 7, 2024
Copy link
Contributor

This PR is stale because it has been opened for more than 3 weeks with no activity. Comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale No feedback from OP label Aug 31, 2024
@danilo-delbusso
Copy link
Author

not stale

@github-actions github-actions bot removed the Stale No feedback from OP label Sep 8, 2024
Copy link
Contributor

github-actions bot commented Oct 2, 2024

This PR is stale because it has been opened for more than 3 weeks with no activity. Comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale No feedback from OP label Oct 2, 2024
@danilo-delbusso
Copy link
Author

not stale

@github-actions github-actions bot removed the Stale No feedback from OP label Oct 8, 2024
@pseudoyu
Copy link
Collaborator

We have /bbc route and /twitter routes, does the /twitter/bbc-user have more advantages? seems confusing.

@pseudoyu
Copy link
Collaborator

Locally seems to work just fine - I assume all the 503 errors here are related to Twitter API / request limitations? Someone more knowledgeable might know

yes it's due to the Twitter API limit.

@danilo-delbusso
Copy link
Author

We have /bbc route and /twitter routes, does the /twitter/bbc-user have more advantages? seems confusing.

good question!

I have been avoiding using /bbc because the official BBC RSS feeds include a wide range of news, not just breaking stories, which can add a lot of noise. The Twitter account BBCBreaking is much more focused on major updates, which makes it ideal for a cleaner feed.

By creating a new feed instead of only using the Twitter one, we get the best of both worlds: we pull in verified BBC articles for reliability, while keeping the feed streamlined and to the point, much like a curated BBC RSS feed with the immediacy of Twitter.

@pseudoyu
Copy link
Collaborator

pseudoyu commented Nov 7, 2024

We have /bbc route and /twitter routes, does the /twitter/bbc-user have more advantages? seems confusing.

good question!

I have been avoiding using /bbc because the official BBC RSS feeds include a wide range of news, not just breaking stories, which can add a lot of noise. The Twitter account BBCBreaking is much more focused on major updates, which makes it ideal for a cleaner feed.

By creating a new feed instead of only using the Twitter one, we get the best of both worlds: we pull in verified BBC articles for reliability, while keeping the feed streamlined and to the point, much like a curated BBC RSS feed with the immediacy of Twitter.

got it. But I still think it should belong to /bbc namespace instead of /twitter. Or it will make users confusing.

@danilo-delbusso
Copy link
Author

We have /bbc route and /twitter routes, does the /twitter/bbc-user have more advantages? seems confusing.

good question!
I have been avoiding using /bbc because the official BBC RSS feeds include a wide range of news, not just breaking stories, which can add a lot of noise. The Twitter account BBCBreaking is much more focused on major updates, which makes it ideal for a cleaner feed.
By creating a new feed instead of only using the Twitter one, we get the best of both worlds: we pull in verified BBC articles for reliability, while keeping the feed streamlined and to the point, much like a curated BBC RSS feed with the immediacy of Twitter.

got it. But I still think it should belong to /bbc namespace instead of /twitter. Or it will make users confusing.

ah! I had misunderstood your original point. Will make the changes, bear with :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto: Route Test Complete Auto route test has finished on given PR core enhancement Route
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants