S
S
Sergey Pavlov2014-07-14 03:02:31
Python
Sergey Pavlov, 2014-07-14 03:02:31

What is the best way to prepare content for embedding on a website?

Prepared a spider and a parser in order to take texts with some attributes (for example, a rating on a donor site). Now the question arose: in what format is it more reasonable to save all this in order to then access the data file with the help of javascript. Json, XML, just a table - which is more reasonable? I am writing in Python 2.7, so if you can, please recommend suitable libraries.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Pavlov, 2014-07-14
@Pavlov_dog

javascript will work in the browser or in Node.js?
If in a browser, then use JSON. You can also xml, but json is more native for javascript, and more convenient, IMHO.
If in Node.js, then consider storing in a database like MongoDB. Both from python and from Node.js, it is very easy to access it and it is easy to get any data (including aggregated ones).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question