File size: 2,427 Bytes
c6cbfc9 356d23d c6cbfc9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | ---
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`
|