semvec/pypi-packages huggingface dataset:
tr-news-scraper 0.1.0
tr-news-scraper is a Python library that allows users to scrape Turkish news articles based on specified keywords from multiple sources. It gather news content from various news websites, enabling users to extract valuable information for analysis or research purposes.
License: MIT
Requires Python: >=3.10,<4.0

# tr-news-scraper

tr-news-scraper is a Python library that allows users to scrape Turkish news articles based on specified keywords from multiple sources. It gather news content from various news websites, enabling users to extract valuable information for analysis or research purposes.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install this library.

```bash
pip install tr-news-scraper
```

## Usage

Scrape news articles based on a single or multiple keywords. scrape() method returns a **pandas dataframe**.

```python

from tr_news_scraper import tr_news_scraper as tns

scraper = tns.NewsScraper() # You can define page_limit parameter here. Default value is 20.
single_keyword_news = scraper.scrape(["keyword"]) # You can define keyword or keywords here.
multiple_keywords_news = scraper.scrape(["keyword_1", "keyword_2", "keyword_3"]) # You can define keyword or keywords here.
```
| title | authors | publish_date | text | keywords | top_img | url | meta_url | meta_img | meta_published_date | meta_description | meta_keywords | date | keyword |
|-------|---------|--------------|------|----------|---------|-----|----------|----------|---------------------|------------------|---------------|------|---------|
| title_1 | authors_1 | publish_date_1 | text_1 | keywords_1 | top_img_1 | url_1 | meta_url_1 | meta_img_1 | meta_published_date_1 | meta_description_1 | meta_keywords_1 | date_1 | keyword_1 |
| title_2 | authors_2 | publish_date_2 | text_2 | keywords_2 | top_img_2 | url_2 | meta_url_2 | meta_img_2 | meta_published_date_2 | meta_description_2 | meta_keywords_2 | date_2 | keyword_2 |
| title_3 | authors_3 | publish_date_3 | text_3 | keywords_3 | top_img_3 | url_3 | meta_url_3 | meta_img_3 | meta_published_date_3 | meta_description_3 | meta_keywords_3 | date_3 | keyword_3 |
| title_4 | authors_4 | publish_date_4 | text_4 | keywords_4 | top_img_4 | url_4 | meta_url_4 | meta_img_4 | meta_published_date_4 | meta_description_4 | meta_keywords_4 | date_4 | keyword_4 |
| title_5 | authors_5 | publish_date_5 | text_5 | keywords_5 | top_img_5 | url_5 | meta_url_5 | meta_img_5 | meta_published_date_5 | meta_description_5 | meta_keywords_5 | date_5 | keyword_5 |

## Sources

- [CNN Türk](https://www.cnnturk.com/)
- [Hürriyet](https://www.hurriyet.com.tr/)
- [Milliyet](https://www.milliyet.com.tr/)
- [Sabah](https://www.sabah.com.tr/)
- [Posta](https://www.posta.com.tr/)
notion2md 2.9.0
Notion Markdown Exporter with Python Cli
License: MIT
Requires Python: >=3.7,<4

![Notion2Md logo - an arrow pointing from "N" to "MD"](Notion2md.jpg)

<br/>

## About Notion2Md

[![Downloads](https://static.pepy.tech/badge/notion2md)](https://pepy.tech/project/notion2md)
[![PyPI version](https://badge.fury.io/py/notion2md.svg)](https://badge.fury.io/py/notion2md)
[![Code Quality](https://github.com/echo724/notion2md/actions/workflows/code_quality.yaml/badge.svg)](https://github.com/echo724/notion2md/actions/workflows/code_quality.yaml)
<a href="https://hits.seeyoufarm.com"><img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fecho724%2Fnotion2md&count_bg=%23949191&title_bg=%23555555&icon=github.svg&icon_color=%23E7E7E7&title=visited&edge_flat=false"/></a>

- Notion Markdown Exporter using **official notion api** by [notion-sdk-py](https://github.com/ramnes/notion-sdk-py)

### Notion2Medium

- Check out [Notion2Medium](https://github.com/echo724/notion2medium) that publishes a **Medium** post from **Notion** using Notion2Md.

## API Key(Token)

- Before getting started, create [an integration and find the token](https://www.notion.so/my-integrations). → [Learn more about authorization](https://developers.notion.com/docs/authorization).

- Then save your api key(token) as your os environment variable

- From version 2.9.0, you can use `--token` or `-t` option to set your token key.

```Bash
$ export NOTION_TOKEN="{your integration token key}"
```

## Install

```Bash
$ pip install notion2md
```

## Usage: Shell Command

![Terminal output of the `notion2md -h` command](notion2md_options.png)

- Notion2md requires either `id` or `url` of the Notion page/block.

- **download** option will download files/images in the `path` directory.

- **unzipped** option makes Notion2Md export ***unzipped*** output of Notion block.

```Bash
notion2md --download -n post -p ~/MyBlog/content/posts -u https://notion.so/...
```

- This command will generate "**post.zip**" in your '**~/MyBlog/content/posts**' directory.

## Usage: Python

```Python
from notion2md.exporter.block import MarkdownExporter, StringExporter

# MarkdownExporter will make markdown file on your output path
MarkdownExporter(block_id='...',output_path='...',download=True).export()

# StringExporter will return output as String type
md = StringExporter(block_id='...',output_path='...').export()
```

## To-do

- [x] Download file object(image and files)
- [x] Table blocks
- [x] Synced Block
- [ ] Page Exporter
- [ ] Child page
- [ ] Column List and Column Blocks

## Contribution

Please read [Contribution Guide](CONTRIBUTION.md)

## Donation

If you think **Notion2Md** is helpful to you, you can support me here:

<a href="https://www.buymeacoffee.com/echo724" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 54px;" height="54"></a>

## License
[MIT](https://choosealicense.com/licenses/mit/)