Skip to main content

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.

Project description

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 to install this library.

pip install tr-news-scraper

Usage

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tr_news_scraper-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

tr_news_scraper-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file tr_news_scraper-0.1.0.tar.gz.

File metadata

  • Download URL: tr_news_scraper-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for tr_news_scraper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6d2ef0e5faa998683e293e2def5a236fc7be341366c174e96247fca3114c3138
MD5 c02feff1d59a1ed3a40b1cb5986f2f1d
BLAKE2b-256 518858c51bb9f92048c401f02ba70da9d11589c9d65be72e2842e743a2f36553

See more details on using hashes here.

File details

Details for the file tr_news_scraper-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tr_news_scraper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0025760e51c83aae8a5b348817c981c73279f446b86e919edafc01803fffbbf5
MD5 5eee7a9fd538d5048df983cc94bf5011
BLAKE2b-256 6b26bf3c73c77a304ef2b57c6cda59e6f810409407197d0ca80fb295c3c2da2a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page