bbc-news


Namebbc-news JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/Sayad-Uddin-Tahsin/BBC-News-API
SummaryA simple and yet easy-to-use API for BBC News
upload_time2024-03-23 09:03:04
maintainerNone
docs_urlNone
authorSayad Uddin Tahsin
requires_python>=3.7
licenseMIT
keywords bbc-news bbc-global bbc-api bbc-news-api bbc-api-wrapper tahsin-project
VCS
bugtrack_url
requirements Flask requests-html asgiref pytz Werkzeug
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
    <a href="https://pypi.org/project/bbc-news"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Sayad-Uddin-Tahsin/BBC-News-API/main/Assets/Dark%20Logo.png"><img alt="Logo" src="https://raw.githubusercontent.com/Sayad-Uddin-Tahsin/BBC-News-API/main/Assets/Light%20Logo.png" height=100 width=100></picture></a>
</p>

# bbc-news

The `bbc-news` Python library provides a simple and intuitive interface for accessing the BBC News API, allowing developers to fetch the latest news articles from the British Broadcasting Corporation (BBC) programmatically. This library aims to streamline the integration of BBC news content into Python applications with ease.

<a href="https://pypi.org/project/bbc-news"><img src="https://img.shields.io/pypi/status/bbc-news?label=Status&logo=pypi&logoColor=ffffff" height=22></a>
<a href="https://pypi.org/project/bbc-news"><img src="https://img.shields.io/pypi/v/bbc-news?label=PyPI Version&logo=pypi&logoColor=ffffff" height=22></a>
<a href="https://python.org"><img src="https://img.shields.io/pypi/pyversions/bbc-news?label=Python&logo=python&logoColor=ffdd54" height=22></a>

<picture><source media="(prefers-color-scheme: dark)" srcset="https://web-badge-psi.vercel.app/latency-badge?theme=dark"><img alt="Latency Badge" src="https://web-badge-psi.vercel.app/latency-badge?theme=light"></picture>

## Features
- **Easy-to-use Interface:** The library offers a straightforward interface for accessing the BBC News API.
- **Language Support:** Users can retrieve news content in over 30 languages supported by the BBC.
- **Customizable Queries:** Developers can tailor their queries to fetch news articles based on specific topics, regions, or categories.
- **Error Handling:** The library includes built-in error handling mechanisms to handle API errors gracefully.

## Installation
You can install the bbc-news library via pip:

```console
python -m pip install bbc-news
```
`bbc-news` requires Python 3.7 or later.

## Quick Start

<!-- Example: Printing Categories -->
<details open>
<summary>Printing section titles</summary>

<!-- Code: Start -->
<details open>
<summary>Code</summary>


```python
# Import the Library
import bbc

# Get the News for Chinese
news = bbc.news.get_news(bbc.Languages.Chinese)

# Get the Category Titles
categories = news.news_categories()

# Print the category titles
print(categories)

```

</details>
<!-- Code: End -->

<!-- Output: Start -->
<details>
<summary>Output</summary>

```console
['Top story - Zhongwen', '必看', '深度报道', '新闻时事 趋势动态', '知识资讯 观点角度', '特别推荐', '台湾大选2024']
```

</details>
</details>

<!-- Example: Printing Category News -->
<details>
<summary>Printing category news' title, image link and news link</summary>

<!-- Code: Start -->
<details open>
<summary>Code</summary>


```python
# Import the Library
import bbc

# Get the News for Bengali
news = bbc.news.get_news(bbc.Languages.Bengali)

# Get the Category Titles
categories = news.news_categories()

# Loop through the category titles
for category in categories:
    # Get the Category News
    section_news = news.news_category(category)

    # Loop through the news dictionary
    for news_dict in section_news:
        # Print the Title
        print(news_dict['title'])

        # Print the Image Link
        print(news_dict['image_link'])

        # Print the News Link
        print(news_dict["news_link"])
                
        # Print a Blank Line
        print("---")
```

</details>
<!-- Code: End -->

<!-- Output: Start -->
<details>
<summary>Output</summary>

```console
ভারতের মুহাম্মদ আসফান যেভাবে রাশিয়া-ইউক্রেন যুদ্ধে মারা গেলেন
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/fd83/live/b9cd1d20-dc91-11ee-9a5b-e35447f6c53b.jpg
https://www.bbc.com/bengali/articles/c720rl118yro
---
গাজায় বিমান থেকে ফেলা ত্রাণের বস্তার নিচে চাপা পড়ে পাঁচ ফিলিস্তিনি নিহত
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/4f7d/live/a3523c10-ddc7-11ee-8bf3-195418ba9285.jpg
https://www.bbc.com/bengali/articles/cd1841llw6eo
---
'বৈশ্বিক গণতান্ত্রিক সূচকে অবনতি বাংলাদেশের'
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/d1ea/live/7af76d90-ddbc-11ee-9080-d35818d60ed3.jpg
https://www.bbc.com/bengali/articles/cpv0wvkprwvo
---
গাজার মাঝ বরাবর ইসরায়েল রাস্তা তৈরি করছে কেন ?
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/3927/live/81f882d0-dd55-11ee-b292-af90e1cb0639.jpg
https://www.bbc.com/bengali/articles/c1e8zxwqwyno
---
জনসংখ্যা কমায় বিপাকে থাকা দেশগুলো থেকে ভারত, পাকিস্তান, বাংলাদেশ কী পেতে পারে?
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/3400/live/a073cc20-dd36-11ee-9a5b-e35447f6c53b.jpg
https://www.bbc.com/bengali/articles/c280gpg8wexo

...
...
...
```

</details>
</details>

<!-- Example: Printing Latest News -->
<details>
<summary>Printing Latest News</summary>

<!-- Code: Start -->
<details open>
<summary>Code</summary>


```python
# Import the Library
import bbc

# Get the Latest News for Arabic
news_list = bbc.news.get_latest_news(bbc.Languages.Arabic)

# Loop through the list
for news_dict in news_list:
    # Print the Title
    print(news_dict['title'])

    # Print the Image Link
    print(news_dict['image_link'])

    # Print the News Link
    print(news_dict["news_link"])
            
    # Print a Blank Line
    print("---")

```

</details>
<!-- Code: End -->

<!-- Output: Start -->
<details>
<summary>Output</summary>

```console
الأمم المتحدة تنتقد إنشاء ممر بحري لإيصال المساعدات في غزة وخمسة قتلى خلال إنزال جوي
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/1cc9/live/6e28cad0-ddaa-11ee-be08-970469947e0a.jpg
https://www.bbc.com/arabic/articles/ce9rn7l6r1lo
---
كندا تستأنف تمويل وكالة الأونروا بعد قرار تعليقها
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/536e/live/69575680-ddb3-11ee-8bf3-195418ba9285.jpg
https://www.bbc.com/arabic/articles/c9945z477k8o
---
مبادرة إنسانية لغزة من أول بلد أوروبي يعترف بالدولة الفلسطينية
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/e629/live/0f753c40-dca5-11ee-b83b-0f87a864f372.jpg
https://www.bbc.com/arabic/articles/cv2ymd20rzjo
---
الضفة الغربية: "رغم محاولتي حماية طفلي إلا أنه قُتِل"!
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/98db/live/f707d570-dd97-11ee-8bf3-195418ba9285.jpg
https://www.bbc.com/arabic/articles/c3gm1eg1deko
---
ما الذي نعرفه عن الممر البحري الذي يشرف الجيش الأمريكي على إنشائه قبالة غزة؟
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/a783/live/9130c4a0-dd3d-11ee-b83b-0f87a864f372.png
https://www.bbc.com/arabic/articles/clejnlz58x1o
---
صور الأقمار الصناعية تظهر اكتمال الطريق الذي أنشأه الجيش الإسرائيلي عبر غزة
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/3dfd/live/3c82b530-dce3-11ee-8f28-259790e80bba.jpg
https://www.bbc.com/arabic/articles/ckk7y2k5117o
---
"مؤامرة إجرامية" يكشف عنها الجيش الأمريكي حاكها أحد جنوده مع الصين
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/9cdb/live/66b71d80-dd21-11ee-b83b-0f87a864f372.jpg
https://www.bbc.com/arabic/articles/cj7ve1mr9v9o
---
بياناتك الشخصية متاحة للجميع، فهل هناك طريقة أفضل للحفاظ على خصوصيتها؟
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/0cf2/live/c5be7b30-dd93-11ee-8be9-db11b274404f.jpg
https://www.bbc.com/arabic/articles/c3gq1kxjp72o
---
اكتشاف بقايا أحفورية لأقدم غابة في العالم تعود لنحو 400 مليون سنة
https://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/0008/live/18a10cf0-dd3f-11ee-9a5b-e35447f6c53b.jpg
https://www.bbc.com/arabic/articles/c723xvpkplko
```

</details>
</details>

<!-- Example: Printing News of English -->
<details>
<summary>Printing News of English</summary>

<!-- Code: Start -->
<details open>
<summary>Code</summary>


```python
# Import the Library
import bbc

# Get the Latest News for English
news = bbc.news.get_news(bbc.Languages.English)

# Get the Category Titles
categories = news.news_categories()

# Loop through the category titles
for category in categories:
    # Get the Category News
    section_news = news.news_category(category)

    # Loop through the news dictionary
    for news_dict in section_news:
        # Print the Title
        print(news_dict['title'])

        # Print the News Description
        print(news_dict['news_description'])

        # ---------------- Note ----------------
        # | English News' Image Link couldn't  |
        # |            be retrived             |
        # |====================================|
        # |    Sorry for the inconvenience     |
        # --------------------------------------

        # Print the News Link
        print(news_dict["news_link"])
        
        # Print a Blank Line
        print("---")

```

</details>
<!-- Code: End -->

<!-- Output: Start -->
<details>
<summary>Output</summary>

```console
Why is Florida 'breaking up' with spring break?
What started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be "breaking up" with the popular pastime.
https://www.bbc.com/travel/article/20240307-why-is-florida-breaking-up-with-spring-break
---
I was cyberbullied while pregnant, says Meghan
What started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be "breaking up" with the popular pastime.
https://www.bbc.com/news/entertainment-arts-68518526
---
Why is Florida 'breaking up' with spring break?
What started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be "breaking up" with the popular pastime.
https://www.bbc.com/travel/article/20240307-why-is-florida-breaking-up-with-spring-break
---
Gaza aid ship expected to set sail from Cyprus
What started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be "breaking up" with the popular pastime.
https://www.bbc.com/news/world-middle-east-68518918
---
New life springs from rescued Sycamore Gap tree
What started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be "breaking up" with the popular pastime.
https://www.bbc.com/news/science-environment-68497720
---
'Confused' TikTokers deluge US lawmakers' phones
What started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be "breaking up" with the popular pastime.
https://www.bbc.com/news/world-us-canada-68517607
---
What the world made of Biden's big speech
What started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be "breaking up" with the popular pastime.
https://www.bbc.com/news/world-us-canada-68510250
---
One of the most controversial Oscars wins ever
What started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be "breaking up" with the popular pastime.
https://www.bbc.com/culture/article/20240307-oscars-1999-controversial-best-picture-win
---
Can women hold onto chief sustainability jobs?
From a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.
https://www.bbc.com/worklife/article/20240307-women-chief-sustainability-officer-jobs
---
HelloFresh shares plunge 40% after earnings warning
From a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.
https://www.bbc.com/news/articles/cgevn1kkjwzo
---
Intuit's AI leader on swapping astrophysics for data science
From a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.
https://www.bbc.com/worklife/article/20240307-nhung-ho-ai-intuit-bbc-executive-interview
---
Production of Duvel beer hit by cyber-attack
From a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.
https://www.bbc.com/news/technology-68512156
---
TikTok sparks user revolt in US over sale plan
From a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.
https://www.bbc.com/news/world-us-canada-68505405
---
Barbie 2? 'We'd love to,' says Warner Bros boss
From a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.
https://www.bbc.com/news/entertainment-arts-68485346
---
The Brit up for three visual effects Oscars
From a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.
https://www.bbc.com/news/entertainment-arts-68518072
---
One of the most controversial Oscars wins ever
From a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.
https://www.bbc.com/culture/article/20240307-oscars-1999-controversial-best-picture-win

...
...
...
```

</details>
</details>

## Contributing
Contributions to the bbc-news Python library are welcome! If you encounter any issues, have suggestions for improvements, or would like to contribute new features, feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/Sayad-Uddin-Tahsin/BBC-News-API).

## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/Sayad-Uddin-Tahsin/BBC-News-API/blob/main/LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Sayad-Uddin-Tahsin/BBC-News-API",
    "name": "bbc-news",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "bbc-news, bbc-global, bbc-api, bbc-news-api, bbc-api-wrapper, tahsin-project",
    "author": "Sayad Uddin Tahsin",
    "author_email": "tahsin.ict@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/1f/97/60b0678c5c402390c49bfce17fa4639b3a3352e41ba26f559c2eec701d94/bbc-news-1.0.1.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n    <a href=\"https://pypi.org/project/bbc-news\"><picture><source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Sayad-Uddin-Tahsin/BBC-News-API/main/Assets/Dark%20Logo.png\"><img alt=\"Logo\" src=\"https://raw.githubusercontent.com/Sayad-Uddin-Tahsin/BBC-News-API/main/Assets/Light%20Logo.png\" height=100 width=100></picture></a>\n</p>\n\n# bbc-news\n\nThe `bbc-news` Python library provides a simple and intuitive interface for accessing the BBC News API, allowing developers to fetch the latest news articles from the British Broadcasting Corporation (BBC) programmatically. This library aims to streamline the integration of BBC news content into Python applications with ease.\n\n<a href=\"https://pypi.org/project/bbc-news\"><img src=\"https://img.shields.io/pypi/status/bbc-news?label=Status&logo=pypi&logoColor=ffffff\" height=22></a>\n<a href=\"https://pypi.org/project/bbc-news\"><img src=\"https://img.shields.io/pypi/v/bbc-news?label=PyPI Version&logo=pypi&logoColor=ffffff\" height=22></a>\n<a href=\"https://python.org\"><img src=\"https://img.shields.io/pypi/pyversions/bbc-news?label=Python&logo=python&logoColor=ffdd54\" height=22></a>\n\n<picture><source media=\"(prefers-color-scheme: dark)\" srcset=\"https://web-badge-psi.vercel.app/latency-badge?theme=dark\"><img alt=\"Latency Badge\" src=\"https://web-badge-psi.vercel.app/latency-badge?theme=light\"></picture>\n\n## Features\n- **Easy-to-use Interface:** The library offers a straightforward interface for accessing the BBC News API.\n- **Language Support:** Users can retrieve news content in over 30 languages supported by the BBC.\n- **Customizable Queries:** Developers can tailor their queries to fetch news articles based on specific topics, regions, or categories.\n- **Error Handling:** The library includes built-in error handling mechanisms to handle API errors gracefully.\n\n## Installation\nYou can install the bbc-news library via pip:\n\n```console\npython -m pip install bbc-news\n```\n`bbc-news` requires Python 3.7 or later.\n\n## Quick Start\n\n<!-- Example: Printing Categories -->\n<details open>\n<summary>Printing section titles</summary>\n\n<!-- Code: Start -->\n<details open>\n<summary>Code</summary>\n\n\n```python\n# Import the Library\nimport bbc\n\n# Get the News for Chinese\nnews = bbc.news.get_news(bbc.Languages.Chinese)\n\n# Get the Category Titles\ncategories = news.news_categories()\n\n# Print the category titles\nprint(categories)\n\n```\n\n</details>\n<!-- Code: End -->\n\n<!-- Output: Start -->\n<details>\n<summary>Output</summary>\n\n```console\n['Top story - Zhongwen', '\u5fc5\u770b', '\u6df1\u5ea6\u62a5\u9053', '\u65b0\u95fb\u65f6\u4e8b \u8d8b\u52bf\u52a8\u6001', '\u77e5\u8bc6\u8d44\u8baf \u89c2\u70b9\u89d2\u5ea6', '\u7279\u522b\u63a8\u8350', '\u53f0\u6e7e\u5927\u90092024']\n```\n\n</details>\n</details>\n\n<!-- Example: Printing Category News -->\n<details>\n<summary>Printing category news' title, image link and news link</summary>\n\n<!-- Code: Start -->\n<details open>\n<summary>Code</summary>\n\n\n```python\n# Import the Library\nimport bbc\n\n# Get the News for Bengali\nnews = bbc.news.get_news(bbc.Languages.Bengali)\n\n# Get the Category Titles\ncategories = news.news_categories()\n\n# Loop through the category titles\nfor category in categories:\n    # Get the Category News\n    section_news = news.news_category(category)\n\n    # Loop through the news dictionary\n    for news_dict in section_news:\n        # Print the Title\n        print(news_dict['title'])\n\n        # Print the Image Link\n        print(news_dict['image_link'])\n\n        # Print the News Link\n        print(news_dict[\"news_link\"])\n                \n        # Print a Blank Line\n        print(\"---\")\n```\n\n</details>\n<!-- Code: End -->\n\n<!-- Output: Start -->\n<details>\n<summary>Output</summary>\n\n```console\n\u09ad\u09be\u09b0\u09a4\u09c7\u09b0 \u09ae\u09c1\u09b9\u09be\u09ae\u09cd\u09ae\u09a6 \u0986\u09b8\u09ab\u09be\u09a8 \u09af\u09c7\u09ad\u09be\u09ac\u09c7 \u09b0\u09be\u09b6\u09bf\u09df\u09be-\u0987\u0989\u0995\u09cd\u09b0\u09c7\u09a8 \u09af\u09c1\u09a6\u09cd\u09a7\u09c7 \u09ae\u09be\u09b0\u09be \u0997\u09c7\u09b2\u09c7\u09a8\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/fd83/live/b9cd1d20-dc91-11ee-9a5b-e35447f6c53b.jpg\nhttps://www.bbc.com/bengali/articles/c720rl118yro\n---\n\u0997\u09be\u099c\u09be\u09df \u09ac\u09bf\u09ae\u09be\u09a8 \u09a5\u09c7\u0995\u09c7 \u09ab\u09c7\u09b2\u09be \u09a4\u09cd\u09b0\u09be\u09a3\u09c7\u09b0 \u09ac\u09b8\u09cd\u09a4\u09be\u09b0 \u09a8\u09bf\u099a\u09c7 \u099a\u09be\u09aa\u09be \u09aa\u09dc\u09c7 \u09aa\u09be\u0981\u099a \u09ab\u09bf\u09b2\u09bf\u09b8\u09cd\u09a4\u09bf\u09a8\u09bf \u09a8\u09bf\u09b9\u09a4\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/4f7d/live/a3523c10-ddc7-11ee-8bf3-195418ba9285.jpg\nhttps://www.bbc.com/bengali/articles/cd1841llw6eo\n---\n'\u09ac\u09c8\u09b6\u09cd\u09ac\u09bf\u0995 \u0997\u09a3\u09a4\u09be\u09a8\u09cd\u09a4\u09cd\u09b0\u09bf\u0995 \u09b8\u09c2\u099a\u0995\u09c7 \u0985\u09ac\u09a8\u09a4\u09bf \u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6\u09c7\u09b0'\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/d1ea/live/7af76d90-ddbc-11ee-9080-d35818d60ed3.jpg\nhttps://www.bbc.com/bengali/articles/cpv0wvkprwvo\n---\n\u0997\u09be\u099c\u09be\u09b0 \u09ae\u09be\u099d \u09ac\u09b0\u09be\u09ac\u09b0 \u0987\u09b8\u09b0\u09be\u09df\u09c7\u09b2 \u09b0\u09be\u09b8\u09cd\u09a4\u09be \u09a4\u09c8\u09b0\u09bf \u0995\u09b0\u099b\u09c7 \u0995\u09c7\u09a8 ?\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/3927/live/81f882d0-dd55-11ee-b292-af90e1cb0639.jpg\nhttps://www.bbc.com/bengali/articles/c1e8zxwqwyno\n---\n\u099c\u09a8\u09b8\u0982\u0996\u09cd\u09af\u09be \u0995\u09ae\u09be\u09df \u09ac\u09bf\u09aa\u09be\u0995\u09c7 \u09a5\u09be\u0995\u09be \u09a6\u09c7\u09b6\u0997\u09c1\u09b2\u09c7\u09be \u09a5\u09c7\u0995\u09c7 \u09ad\u09be\u09b0\u09a4, \u09aa\u09be\u0995\u09bf\u09b8\u09cd\u09a4\u09be\u09a8, \u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6 \u0995\u09c0 \u09aa\u09c7\u09a4\u09c7 \u09aa\u09be\u09b0\u09c7?\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/3400/live/a073cc20-dd36-11ee-9a5b-e35447f6c53b.jpg\nhttps://www.bbc.com/bengali/articles/c280gpg8wexo\n\n...\n...\n...\n```\n\n</details>\n</details>\n\n<!-- Example: Printing Latest News -->\n<details>\n<summary>Printing Latest News</summary>\n\n<!-- Code: Start -->\n<details open>\n<summary>Code</summary>\n\n\n```python\n# Import the Library\nimport bbc\n\n# Get the Latest News for Arabic\nnews_list = bbc.news.get_latest_news(bbc.Languages.Arabic)\n\n# Loop through the list\nfor news_dict in news_list:\n    # Print the Title\n    print(news_dict['title'])\n\n    # Print the Image Link\n    print(news_dict['image_link'])\n\n    # Print the News Link\n    print(news_dict[\"news_link\"])\n            \n    # Print a Blank Line\n    print(\"---\")\n\n```\n\n</details>\n<!-- Code: End -->\n\n<!-- Output: Start -->\n<details>\n<summary>Output</summary>\n\n```console\n\u0627\u0644\u0623\u0645\u0645 \u0627\u0644\u0645\u062a\u062d\u062f\u0629 \u062a\u0646\u062a\u0642\u062f \u0625\u0646\u0634\u0627\u0621 \u0645\u0645\u0631 \u0628\u062d\u0631\u064a \u0644\u0625\u064a\u0635\u0627\u0644 \u0627\u0644\u0645\u0633\u0627\u0639\u062f\u0627\u062a \u0641\u064a \u063a\u0632\u0629 \u0648\u062e\u0645\u0633\u0629 \u0642\u062a\u0644\u0649 \u062e\u0644\u0627\u0644 \u0625\u0646\u0632\u0627\u0644 \u062c\u0648\u064a\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/1cc9/live/6e28cad0-ddaa-11ee-be08-970469947e0a.jpg\nhttps://www.bbc.com/arabic/articles/ce9rn7l6r1lo\n---\n\u0643\u0646\u062f\u0627 \u062a\u0633\u062a\u0623\u0646\u0641 \u062a\u0645\u0648\u064a\u0644 \u0648\u0643\u0627\u0644\u0629 \u0627\u0644\u0623\u0648\u0646\u0631\u0648\u0627 \u0628\u0639\u062f \u0642\u0631\u0627\u0631 \u062a\u0639\u0644\u064a\u0642\u0647\u0627\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/536e/live/69575680-ddb3-11ee-8bf3-195418ba9285.jpg\nhttps://www.bbc.com/arabic/articles/c9945z477k8o\n---\n\u0645\u0628\u0627\u062f\u0631\u0629 \u0625\u0646\u0633\u0627\u0646\u064a\u0629 \u0644\u063a\u0632\u0629 \u0645\u0646 \u0623\u0648\u0644 \u0628\u0644\u062f \u0623\u0648\u0631\u0648\u0628\u064a \u064a\u0639\u062a\u0631\u0641 \u0628\u0627\u0644\u062f\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064a\u0646\u064a\u0629\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/e629/live/0f753c40-dca5-11ee-b83b-0f87a864f372.jpg\nhttps://www.bbc.com/arabic/articles/cv2ymd20rzjo\n---\n\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063a\u0631\u0628\u064a\u0629: \"\u0631\u063a\u0645 \u0645\u062d\u0627\u0648\u0644\u062a\u064a \u062d\u0645\u0627\u064a\u0629 \u0637\u0641\u0644\u064a \u0625\u0644\u0627 \u0623\u0646\u0647 \u0642\u064f\u062a\u0650\u0644\"!\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/98db/live/f707d570-dd97-11ee-8bf3-195418ba9285.jpg\nhttps://www.bbc.com/arabic/articles/c3gm1eg1deko\n---\n\u0645\u0627 \u0627\u0644\u0630\u064a \u0646\u0639\u0631\u0641\u0647 \u0639\u0646 \u0627\u0644\u0645\u0645\u0631 \u0627\u0644\u0628\u062d\u0631\u064a \u0627\u0644\u0630\u064a \u064a\u0634\u0631\u0641 \u0627\u0644\u062c\u064a\u0634 \u0627\u0644\u0623\u0645\u0631\u064a\u0643\u064a \u0639\u0644\u0649 \u0625\u0646\u0634\u0627\u0626\u0647 \u0642\u0628\u0627\u0644\u0629 \u063a\u0632\u0629\u061f\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/a783/live/9130c4a0-dd3d-11ee-b83b-0f87a864f372.png\nhttps://www.bbc.com/arabic/articles/clejnlz58x1o\n---\n\u0635\u0648\u0631 \u0627\u0644\u0623\u0642\u0645\u0627\u0631 \u0627\u0644\u0635\u0646\u0627\u0639\u064a\u0629 \u062a\u0638\u0647\u0631 \u0627\u0643\u062a\u0645\u0627\u0644 \u0627\u0644\u0637\u0631\u064a\u0642 \u0627\u0644\u0630\u064a \u0623\u0646\u0634\u0623\u0647 \u0627\u0644\u062c\u064a\u0634 \u0627\u0644\u0625\u0633\u0631\u0627\u0626\u064a\u0644\u064a \u0639\u0628\u0631 \u063a\u0632\u0629\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/3dfd/live/3c82b530-dce3-11ee-8f28-259790e80bba.jpg\nhttps://www.bbc.com/arabic/articles/ckk7y2k5117o\n---\n\"\u0645\u0624\u0627\u0645\u0631\u0629 \u0625\u062c\u0631\u0627\u0645\u064a\u0629\" \u064a\u0643\u0634\u0641 \u0639\u0646\u0647\u0627 \u0627\u0644\u062c\u064a\u0634 \u0627\u0644\u0623\u0645\u0631\u064a\u0643\u064a \u062d\u0627\u0643\u0647\u0627 \u0623\u062d\u062f \u062c\u0646\u0648\u062f\u0647 \u0645\u0639 \u0627\u0644\u0635\u064a\u0646\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/9cdb/live/66b71d80-dd21-11ee-b83b-0f87a864f372.jpg\nhttps://www.bbc.com/arabic/articles/cj7ve1mr9v9o\n---\n\u0628\u064a\u0627\u0646\u0627\u062a\u0643 \u0627\u0644\u0634\u062e\u0635\u064a\u0629 \u0645\u062a\u0627\u062d\u0629 \u0644\u0644\u062c\u0645\u064a\u0639\u060c \u0641\u0647\u0644 \u0647\u0646\u0627\u0643 \u0637\u0631\u064a\u0642\u0629 \u0623\u0641\u0636\u0644 \u0644\u0644\u062d\u0641\u0627\u0638 \u0639\u0644\u0649 \u062e\u0635\u0648\u0635\u064a\u062a\u0647\u0627\u061f\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/0cf2/live/c5be7b30-dd93-11ee-8be9-db11b274404f.jpg\nhttps://www.bbc.com/arabic/articles/c3gq1kxjp72o\n---\n\u0627\u0643\u062a\u0634\u0627\u0641 \u0628\u0642\u0627\u064a\u0627 \u0623\u062d\u0641\u0648\u0631\u064a\u0629 \u0644\u0623\u0642\u062f\u0645 \u063a\u0627\u0628\u0629 \u0641\u064a \u0627\u0644\u0639\u0627\u0644\u0645 \u062a\u0639\u0648\u062f \u0644\u0646\u062d\u0648 400 \u0645\u0644\u064a\u0648\u0646 \u0633\u0646\u0629\nhttps://ichef.bbci.co.uk/ace/standard/240/cpsprodpb/0008/live/18a10cf0-dd3f-11ee-9a5b-e35447f6c53b.jpg\nhttps://www.bbc.com/arabic/articles/c723xvpkplko\n```\n\n</details>\n</details>\n\n<!-- Example: Printing News of English -->\n<details>\n<summary>Printing News of English</summary>\n\n<!-- Code: Start -->\n<details open>\n<summary>Code</summary>\n\n\n```python\n# Import the Library\nimport bbc\n\n# Get the Latest News for English\nnews = bbc.news.get_news(bbc.Languages.English)\n\n# Get the Category Titles\ncategories = news.news_categories()\n\n# Loop through the category titles\nfor category in categories:\n    # Get the Category News\n    section_news = news.news_category(category)\n\n    # Loop through the news dictionary\n    for news_dict in section_news:\n        # Print the Title\n        print(news_dict['title'])\n\n        # Print the News Description\n        print(news_dict['news_description'])\n\n        # ---------------- Note ----------------\n        # | English News' Image Link couldn't  |\n        # |            be retrived             |\n        # |====================================|\n        # |    Sorry for the inconvenience     |\n        # --------------------------------------\n\n        # Print the News Link\n        print(news_dict[\"news_link\"])\n        \n        # Print a Blank Line\n        print(\"---\")\n\n```\n\n</details>\n<!-- Code: End -->\n\n<!-- Output: Start -->\n<details>\n<summary>Output</summary>\n\n```console\nWhy is Florida 'breaking up' with spring break?\nWhat started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be \"breaking up\" with the popular pastime.\nhttps://www.bbc.com/travel/article/20240307-why-is-florida-breaking-up-with-spring-break\n---\nI was cyberbullied while pregnant, says Meghan\nWhat started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be \"breaking up\" with the popular pastime.\nhttps://www.bbc.com/news/entertainment-arts-68518526\n---\nWhy is Florida 'breaking up' with spring break?\nWhat started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be \"breaking up\" with the popular pastime.\nhttps://www.bbc.com/travel/article/20240307-why-is-florida-breaking-up-with-spring-break\n---\nGaza aid ship expected to set sail from Cyprus\nWhat started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be \"breaking up\" with the popular pastime.\nhttps://www.bbc.com/news/world-middle-east-68518918\n---\nNew life springs from rescued Sycamore Gap tree\nWhat started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be \"breaking up\" with the popular pastime.\nhttps://www.bbc.com/news/science-environment-68497720\n---\n'Confused' TikTokers deluge US lawmakers' phones\nWhat started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be \"breaking up\" with the popular pastime.\nhttps://www.bbc.com/news/world-us-canada-68517607\n---\nWhat the world made of Biden's big speech\nWhat started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be \"breaking up\" with the popular pastime.\nhttps://www.bbc.com/news/world-us-canada-68510250\n---\nOne of the most controversial Oscars wins ever\nWhat started as an escape for college swimmers has evolved into a debaucherous party. But after recent crackdowns, some Florida cities may be \"breaking up\" with the popular pastime.\nhttps://www.bbc.com/culture/article/20240307-oscars-1999-controversial-best-picture-win\n---\nCan women hold onto chief sustainability jobs?\nFrom a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.\nhttps://www.bbc.com/worklife/article/20240307-women-chief-sustainability-officer-jobs\n---\nHelloFresh shares plunge 40% after earnings warning\nFrom a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.\nhttps://www.bbc.com/news/articles/cgevn1kkjwzo\n---\nIntuit's AI leader on swapping astrophysics for data science\nFrom a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.\nhttps://www.bbc.com/worklife/article/20240307-nhung-ho-ai-intuit-bbc-executive-interview\n---\nProduction of Duvel beer hit by cyber-attack\nFrom a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.\nhttps://www.bbc.com/news/technology-68512156\n---\nTikTok sparks user revolt in US over sale plan\nFrom a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.\nhttps://www.bbc.com/news/world-us-canada-68505405\n---\nBarbie 2? 'We'd love to,' says Warner Bros boss\nFrom a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.\nhttps://www.bbc.com/news/entertainment-arts-68485346\n---\nThe Brit up for three visual effects Oscars\nFrom a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.\nhttps://www.bbc.com/news/entertainment-arts-68518072\n---\nOne of the most controversial Oscars wins ever\nFrom a small island in Venice, a 15th-Century monk designed an astonishingly accurate planisphere of the world.\nhttps://www.bbc.com/culture/article/20240307-oscars-1999-controversial-best-picture-win\n\n...\n...\n...\n```\n\n</details>\n</details>\n\n## Contributing\nContributions to the bbc-news Python library are welcome! If you encounter any issues, have suggestions for improvements, or would like to contribute new features, feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/Sayad-Uddin-Tahsin/BBC-News-API).\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/Sayad-Uddin-Tahsin/BBC-News-API/blob/main/LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A simple and yet easy-to-use API for BBC News",
    "version": "1.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/Sayad-Uddin-Tahsin/bbc-news/issues",
        "Homepage": "https://github.com/Sayad-Uddin-Tahsin/BBC-News-API",
        "PyPI": "https://pypi.org/project/bbc-news/"
    },
    "split_keywords": [
        "bbc-news",
        " bbc-global",
        " bbc-api",
        " bbc-news-api",
        " bbc-api-wrapper",
        " tahsin-project"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9328ff217a4ff537209ccc83d322fe4a1d25e3b0c03a31f6d85acb497d5f4166",
                "md5": "c28eec2a711368a67021dae63aeb4b2b",
                "sha256": "49c7b6e9b3973fc593e8a5abb18c61066bac06190cd757cbf339f87fbf0ea215"
            },
            "downloads": -1,
            "filename": "bbc_news-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c28eec2a711368a67021dae63aeb4b2b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 13508,
            "upload_time": "2024-03-23T09:03:02",
            "upload_time_iso_8601": "2024-03-23T09:03:02.877249Z",
            "url": "https://files.pythonhosted.org/packages/93/28/ff217a4ff537209ccc83d322fe4a1d25e3b0c03a31f6d85acb497d5f4166/bbc_news-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f9760b0678c5c402390c49bfce17fa4639b3a3352e41ba26f559c2eec701d94",
                "md5": "22532588a5beeb4f933e3d184041350f",
                "sha256": "a5bdb6c5315c1c35ca648167aa7e72b42c7f047e1ebf7bc9432aa69c24f9e8d8"
            },
            "downloads": -1,
            "filename": "bbc-news-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "22532588a5beeb4f933e3d184041350f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 12520,
            "upload_time": "2024-03-23T09:03:04",
            "upload_time_iso_8601": "2024-03-23T09:03:04.635349Z",
            "url": "https://files.pythonhosted.org/packages/1f/97/60b0678c5c402390c49bfce17fa4639b3a3352e41ba26f559c2eec701d94/bbc-news-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-23 09:03:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Sayad-Uddin-Tahsin",
    "github_project": "BBC-News-API",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "Flask",
            "specs": [
                [
                    "==",
                    "2.2.2"
                ]
            ]
        },
        {
            "name": "requests-html",
            "specs": [
                [
                    "==",
                    "0.10.0"
                ]
            ]
        },
        {
            "name": "asgiref",
            "specs": [
                [
                    "==",
                    "3.5.2"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2022.7.1"
                ]
            ]
        },
        {
            "name": "Werkzeug",
            "specs": [
                [
                    "==",
                    "2.2.2"
                ]
            ]
        }
    ],
    "lcname": "bbc-news"
}
        
Elapsed time: 0.21509s