Skip to main content

Vinews is an open-source library which provides modules for searching and scraping news data from Vietnamese news websites.

Reason this release was yanked:

mistaken in versioning

Project description

VINEWS

An open-source library dedicated to searching and scraping Vietnamese news websites with the goal of providing tools and enhancing AI agents news searching capabilities.

Note: This library is still under active development. Expect bugs and incomplete features. Contributions are welcome and appreciated!

Disclaimer & Terms of Use ‼️

This library is provided for educational and research purposes only. You are solely responsible for how you use it. Before scraping any website, you must ensure that your actions comply with all applicable laws and the website’s own policies — including their Terms of Service and robots.txt directives. Many websites explicitly prohibit automated access. The authors and contributors are not responsible for any misuse or legal issues arising from the use of this tool. Always scrape ethically, respectfully, and within legal boundaries.

Responsible Scraping ‼️

Please be respectful of the websites you interact with. Always use appropriate rate limiting and avoid sending excessive requests. Scraping should never disrupt or degrade the performance of a website. Generating unreasonable traffic may not only lead to IP bans but could also violate legal or ethical standards. Respect the site's resources, policies, and the efforts of its creators.

Supported Websites

  • VnExpress

Installation

pip install -i https://test.pypi.org/simple \
            --extra-index-url https://pypi.org/simple \
            vinews==0.1.0.dev1

Quick Start

from vinews.modules.vnexpress.search import VinewsVnExpressSearch
import asyncio
import json

search_engine = VinewsVnExpressSearch()
query = "Bitcoin"
    
# Test synchronous search
results = search_engine.search(query=query, date_range="day", category="kinhdoanh", limit=5, advanced=True)
print(results)

homepage = search_engine.search_homepage()
print(homepage)    

# Test asynchronous search
async def async_test():
    async_results = await search_engine.async_search(query=query, date_range="day", category="kinhdoanh", limit=5, advanced=True)
    
    async_homepage = await search_engine.async_search_homepage()

    # Optional saving
    with open("tests/output/vnexpress_search.json", "w", encoding="utf-8") as f:
        json.dump(async_results.model_dump(), f, indent=2, ensure_ascii=False)
    
    with open("tests/output/vnexpress_homepage.json", "w", encoding="utf-8") as f:
        json.dump(async_homepage.model_dump(), f, indent=2, ensure_ascii=False)
    
    asyncio.run(async_test())

if __name__ == "__main__":
    async_test()

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT - see the LICENSE file for details.

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

vinews-0.1.0.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vinews-0.1.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vinews-0.1.0.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for vinews-0.1.0.tar.gz
Algorithm Hash digest
SHA256 993d170a1e394b94a79c1eb768dedff8cfbdc2a4b1c904825feaacc8b5b78f7e
MD5 3e3415755456786fc59a4b238c5e4055
BLAKE2b-256 299cb00f832a81ebd0318ccf2603500d64bbaa8f5db42ff721635e059697fae7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vinews-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for vinews-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2199e1657eeff6b70f6e34ccd520cba814eeed37f6cda66989b10caee65e9fa3
MD5 8584da9773bf1a82efb5e3083292c577
BLAKE2b-256 fdcd52d676d79ad5b96f16d793e8be4430ff7ea4ef8c5611a2abe0a92bb73acc

See more details on using hashes here.

Supported by

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