โปรแกรมดึงข่าวอัตโนมัติจากเว็บไซต์ Spacebar.th พร้อม GUI ที่สวยงามและใช้งานง่าย
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
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 พร้อมเปิดนำไปใช้งานต่อได้ทันที
ทำตามขั้นตอนด้านล่างเพื่อติดตั้งและใช้งานโปรแกรมในเครื่องของคุณ
โปรแกรมนี้ต้องการ Python 3.8 ขึ้นไป
- ตรวจสอบ version python:
python --version
- Clone repo นี้ลงในเครื่อง
git clone https://github.com/naravid19/spacebar-scraper.git
- เข้าไปที่โฟลเดอร์โปรเจกต์
cd spacebar-scraper - (Optional) สร้าง Virtual Environment
python -m venv venv source venv/bin/activate # Mac/Linux venv\Scripts\activate # Windows
- ติดตั้ง Libraries ที่จำเป็น
pip install -r requirements.txt
- รันโปรแกรมผ่านคำสั่ง:
python spacebar_scraper_gui.py
- หน้าต่างโปรแกรมจะเปิดขึ้นมา:
- หมวดหมู่ข่าว: เลือกหมวดที่ต้องการ (เช่น การเมือง, ธุรกิจ)
- เริ่มหน้า / ถึงหน้า: ระบุหน้าที่ต้องการให้เริ่มดึง และหน้าที่ให้หยุด (ใส่ 0 ถ้าต้องการดึงจนหมด)
- บันทึกไฟล์: เลือกชื่อไฟล์และที่เก็บไฟล์ CSV
- กดปุ่ม START SCRAPING เพื่อเริ่มทำงาน 🚀
- รอจนกว่าจะเสร็จ (จะมีแถบความคืบหน้าแจ้งเตือน) เมื่อเสร็จแล้วสามารถกด Open Folder เพื่อดูไฟล์ผลลัพธ์ได้ทันที
- 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.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the Unlicense License. See LICENSE.txt for more information.
Narawit - @naravid19
Project Link: https://github.com/naravid19/spacebar-scraper