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 1 commit 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
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.

None yet

1 participant