Skip to content

cihatksm/news-turkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modül İndirme:

  npm install news-turkey

Örnek Kullanım:

const news = require('news-turkey')
const date = () => new Date()

console.log(date(), 'System opened!')

setTimeout(async () => {
    // "count"    : Kaç tane haberin gösterileceğini belirleyebilirsiniz.
    // "category" : Haber kategorisini belirleyebilirsiniz.
    // "tag"      : Haber etiketleri arasında belirttiğiniz tag olan haberleri alınmasını sağlayabilirsiniz.
    const information = await news({ count: 3 });
    console.log(information);
}, 2000);

// Farklı bir kullanım şekli:
// news({ count: 3 }).then(information => {
//     console.log(information)
// })

Örnek Çıktı:

[
    {
        "category": "...",
        "title": "...",
        "description": [
            { "text": "..." },
            { "image": "https://trthaber.com//dosyalar/images/...jpg" },
            { "text": "..." },
        ],
        "image": "https://trthaberstatic.cdn.wp.trt.com.tr/...jpg",
        "link": "https://trthaber.com/haber/gundem/...html",
        "source": "...",
        "date": "01.01.2001 21:21",
        "updateDate": "01.01.2001 21:22",
        "newTags": [
            { "link": "https://www.trthaber.com/etiket/.../", "title": "..." },
            {...}
        ]
    }
    {...},
    {...}
]

ISC License

Geri Bildirim

E-posta: me@cihatksm.com adresinden bana ulaşın.

Bilgi

Bu modülde trthaber.com web sitesindeki haberler yer almaktadır.
Herhangi bir sorun teşkil ediyorsa, problem oluşturuyorsa ya da oluşturduysa önce tarafıma bilgi verilmesi rica olunur.

About

This module was made to list the news in Turkey.

Topics

Resources

License

Stars

Watchers

Forks