vendredi 5 juillet 2019

How do display list of contents from text file? [on hold]

I am creating a website that scrapes data from different websites and display them on my website.

I thought of using Python Scrapy to Scrape the data and store it in a text file, from where I can load it to my website. I know how to do it in React (see my code below), but I want to do it in HTML using simple javascript. Please suggest me what I should do?

renderComments({comments}){
    if(comments != null){
        const commentList=comments.map((comment)=>{
            return(
                <li key={comment.id}>
                   <p> {comment.detail}</p>
                   <p>--{comment.author}</p>
                </li>
            );
        });

        return(
            <div className="col-12 col-md-5 m-1">
                <h4>Comments</h4>
                <ul className='list-unstyled'>
                    {commentList}
                </ul>
            </div>
        );
    }
}




Aucun commentaire:

Enregistrer un commentaire