Better naming

This commit is contained in:
Rémi Oudin 2018-02-25 11:49:44 +01:00
parent ee32e5385b
commit 7c0fb7dda1

View file

@ -68,18 +68,19 @@ def generate_partial_history(user, t_start):
""" Generate the part of the history resulting from the crawl starting at
the given url.
"""
timestamp = t_start
result = []
basis = generate_first_url(user)
result.append((basis, t_start))
t_start += 5* random.weibullvariate(1, 1.5)
result.append((basis, timestamp))
timestamp += 5* random.weibullvariate(1, 1.5)
queue = Queue()
crawler = crawl.CrawlingThread(user, basis, queue)
crawler.start()
crawler.join()
urls = queue.get()
for url in urls:
t_start += 5* random.weibullvariate(1, 1.5)
result.append((url, t_start)
timestamp += 5* random.weibullvariate(1, 1.5)
result.append((url, timestamp))
return result
def generate_first_url(user):