|
Download README.md from starkbyte45896/Coding_News_Scrapping: direct link, hf CLI and curl.
- Browser
- Download file 2.43 kB
-
https://huggingface.co/spaces/starkbyte45896/Coding_News_Scrapping/resolve/main/README.md
- Command line
-
hf download hf://spaces/starkbyte45896/Coding_News_Scrapping/README.md
-
curl -L -o README.md https://huggingface.co/spaces/starkbyte45896/Coding_News_Scrapping/resolve/main/README.md
2.43 kB
| title: Coding News Scrapping | |
| emoji: π | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: docker | |
| app_port: 7860 | |
| pinned: false | |
| # π Coding News Scraper API | |
|  | |
|  | |
|  | |
| A powerful, fast, and lightweight web scraping API built with **Flask** and **BeautifulSoup**. It automatically fetches the latest programming and tech-related news, articles, cover images, and links from top developer platforms. | |
| You can view the live deployment and test the UI on Hugging Face Spaces: | |
| π **[Coding News Scrapping on Hugging Face](https://huggingface.co/spaces/starkbyte45896/Coding_News_Scrapping)** | |
| ## π Features | |
| - **Aggregated Tech News:** Fetches top stories from 12+ leading coding sites (InfoQ, Hackernoon, Medium, FreeCodeCamp, DZone, and more). | |
| - **Rich Data:** Returns article titles, source links, and thumbnail images for beautiful UI integrations (perfect for masonry or card layouts). | |
| - **Fast & Lightweight:** Built using `requests` and `BeautifulSoup` for quick HTML parsing. | |
| - **RESTful Endpoint:** Easy-to-use JSON response format. | |
| ## π‘ API Endpoint | |
| ### `GET /news` | |
| Returns a JSON array of the latest tech articles. | |
| **Example Response:** | |
| ```json | |
| [ | |
| { | |
| "title": "State of CSS 2024", | |
| "url": "https://css-tricks.com/...", | |
| "image": "https://css-tricks.com/wp-content/...", | |
| "source": "CSS-Tricks" | |
| }, | |
| { | |
| "title": "Stateless MCP for Beginners", | |
| "url": "https://hackernoon.com/...", | |
| "image": "https://hackernoon.com/images/...", | |
| "source": "Hackernoon" | |
| } | |
| ] | |
| ``` | |
| ## π οΈ Supported Sources | |
| - InfoQ | |
| - Hackernoon | |
| - Medium (Programming tag) | |
| - DZone | |
| - FreeCodeCamp | |
| - CSS-Tricks | |
| - SitePoint | |
| - Android Dev Blog | |
| - Google AI Blog | |
| - GitHub Blog | |
| - Smashing Magazine | |
| - The New Stack | |
| ## π How to Run Locally | |
| 1. **Clone the repository:** | |
| ```bash | |
| git clone https://github.com/Aditya948351/Web_Scrapping_API.git | |
| cd Web_Scrapping_API | |
| ``` | |
| 2. **Install dependencies:** | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| 3. **Run the Flask API:** | |
| ```bash | |
| python Web_scrapper.py | |
| ``` | |
| *(Note: You may need to set your preferred port in `Web_scrapper.py` at the bottom before running).* | |
| 4. **Access the API:** | |
| Open your browser and navigate to `http://localhost:<YOUR_PORT>/news` | |