I have a program that takes 1 URL from a user, crawls the whole site and returns a list of all URL's with some parsed data for each URL.
It all looks like:
class Crawl(url_from_user):
self.result = [<Page object at 1>, <Page object at 2>, <Page object at 3>]
class Page(url):
self.data_1 = "string_1"
self.data_2 = "string_2"
self.data_3 = "string_3"
class Crawl - handle threading and all common inputs/data for each page.
class Page - store unique data for each page and handle parsing HTML.
I want to put this program to be a web site.
With Django, I want to create pages that would take url_from_user and start crawling a site.
I want to store the results in a SQL database, to be able to pass it to different views.
The question is how I can dynamically display results during a crawl, while isn't finished? In the middle of Crawl, I can show the result to "stdout" in the console. Can I show not finished result in HTML page?
My first thought is JQuery, but could JQuery hook to stdout output (or better if it would have access to a result list itself with all methods of Page - then I would be able to manipulate individual elements of the list when the list is still growing with running Crawl)?