Skip to content

โปรแกรมดึงข่าวอัตโนมัติจาก spacebar.th รองรับการเลือกหมวดหมู่ ฟิลเตอร์วันที่ และบันทึกไฟล์ได้หลายรูปแบบ (CSV, Excel, JSON, TXT)

Notifications You must be signed in to change notification settings

naravid19/spacebar-scraper

Repository files navigation

Contributors Forks Stargazers Issues Unlicense License


โปรแกรมดึงข่าวอัตโนมัติจากเว็บไซต์ Spacebar.th พร้อม GUI ที่สวยงามและใช้งานง่าย
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

Spacebar News Scraper คือโปรแกรม Desktop Application สำหรับดึงข้อมูลข่าวสารจากเว็บไซต์ Spacebar.th พัฒนาด้วยภาษา Python โดยเน้นที่ความง่ายในการใช้งาน ความสวยงามของหน้าตาโปรแกรม (UI) และความเสถียรในการทำงาน

ฟีเจอร์เด่น:

  • 🎨 Modern UI: ออกแบบด้วย Material Design (ใช้ ttkbootstrap) สวยงาม ทันสมัย และรองรับ Dark Mode
  • 📂 Customizable: เลือกหมวดหมู่ข่าว (การเมือง, ธุรกิจ, สังคม ฯลฯ) และกำหนดช่วงหน้า (Page Range) ที่ต้องการดึงได้
  • Robust: ระบบจัดการ URL ที่แม่นยำ ป้องกัน Link เสีย และมีระบบ Retry อัตโนมัติเมื่อเน็ตมีปัญหา
  • 📝 Export Data: บันทึกข้อมูลที่ได้เป็นไฟล์ CSV พร้อมเปิดนำไปใช้งานต่อได้ทันที

(back to top)

Built With

  • Python
  • BeautifulSoup
  • Pandas
  • Tkinter

(back to top)

Getting Started

ทำตามขั้นตอนด้านล่างเพื่อติดตั้งและใช้งานโปรแกรมในเครื่องของคุณ

Prerequisites

โปรแกรมนี้ต้องการ Python 3.8 ขึ้นไป

  • ตรวจสอบ version python:
    python --version

Installation

  1. Clone repo นี้ลงในเครื่อง
    git clone https://github.com/naravid19/spacebar-scraper.git
  2. เข้าไปที่โฟลเดอร์โปรเจกต์
    cd spacebar-scraper
  3. (Optional) สร้าง Virtual Environment
    python -m venv venv
    source venv/bin/activate  # Mac/Linux
    venv\Scripts\activate     # Windows
  4. ติดตั้ง Libraries ที่จำเป็น
    pip install -r requirements.txt

(back to top)

Usage

  1. รันโปรแกรมผ่านคำสั่ง:
    python spacebar_scraper_gui.py
  2. หน้าต่างโปรแกรมจะเปิดขึ้นมา:
    • หมวดหมู่ข่าว: เลือกหมวดที่ต้องการ (เช่น การเมือง, ธุรกิจ)
    • เริ่มหน้า / ถึงหน้า: ระบุหน้าที่ต้องการให้เริ่มดึง และหน้าที่ให้หยุด (ใส่ 0 ถ้าต้องการดึงจนหมด)
    • บันทึกไฟล์: เลือกชื่อไฟล์และที่เก็บไฟล์ CSV
  3. กดปุ่ม START SCRAPING เพื่อเริ่มทำงาน 🚀
  4. รอจนกว่าจะเสร็จ (จะมีแถบความคืบหน้าแจ้งเตือน) เมื่อเสร็จแล้วสามารถกด Open Folder เพื่อดูไฟล์ผลลัพธ์ได้ทันที

(back to top)

Roadmap

  • GUI Fundamental Features (Category, Page Selection)
  • Export to CSV
  • Dark Mode Support
  • Professional Refactor (Type checking, Error Handling)
  • Export to Excel (.xlsx) direct support
  • Multi-threading for faster scraping (Parallel Requests)

See the open issues for a full list of proposed features.

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the Unlicense License. See LICENSE.txt for more information.

(back to top)

Contact

Narawit - @naravid19

Project Link: https://github.com/naravid19/spacebar-scraper

(back to top)

About

โปรแกรมดึงข่าวอัตโนมัติจาก spacebar.th รองรับการเลือกหมวดหมู่ ฟิลเตอร์วันที่ และบันทึกไฟล์ได้หลายรูปแบบ (CSV, Excel, JSON, TXT)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages