Skip to content

Instantly share code, notes, and snippets.

View ismailmazumder's full-sized avatar
📘
Learning

Ismail Mazumder ismailmazumder

📘
Learning
View GitHub Profile
@ismailmazumder
ismailmazumder / prothomalo_scrap.py
Created December 25, 2024 20:14
web scraping bangla prothom alo
import bs4,os,requests,json,csv,re
with open('output.csv', mode='w', encoding='utf-8', newline='') as file:
writer = csv.writer(file)
# Write header (optional)
writer.writerow(["instruction", "input","story"])
links = [
"https://www.prothomalo.com/api/v1/collections/latest",
"https://www.prothomalo.com/api/v1/collections/politics",
"https://www.prothomalo.com/api/v1/collections/bangladesh",