Compare commits
2 commits
65f777f00f
...
5d4bd30e20
Author | SHA1 | Date | |
---|---|---|---|
Rémi Oudin | 5d4bd30e20 | ||
Rémi Oudin | bdfa285e6b |
|
@ -73,7 +73,7 @@ def url_getter(html, current_page, root_url):
|
|||
# Works only with python >= 3.6
|
||||
links_list = list(dict.fromkeys(links_list))
|
||||
|
||||
forbidden_words = ['login', 'agreement', 'mailto']
|
||||
forbidden_words = ['login', 'agreement', 'mailto', 'settings']
|
||||
links_list = [link for link in links_list if not any(word in link.lower()
|
||||
for word in
|
||||
forbidden_words)]
|
||||
|
|
|
@ -9,6 +9,7 @@ from math import floor
|
|||
from xml.etree import ElementTree as ET
|
||||
from datetime import datetime
|
||||
from django.db import models
|
||||
from django.core.exceptions import ValidationError
|
||||
import profiles.models as profiles
|
||||
from crawl import crawl
|
||||
from pinocchio.settings import HISTORY_MIN
|
||||
|
@ -239,7 +240,10 @@ def generate_history(user, start_time):
|
|||
timestamp=datetime.fromtimestamp(timestamp),
|
||||
history=history
|
||||
)
|
||||
new_line.full_clean()
|
||||
new_line.save()
|
||||
try:
|
||||
new_line.full_clean()
|
||||
new_line.save()
|
||||
except ValidationError:
|
||||
pass
|
||||
|
||||
return history
|
||||
|
|
Loading…
Reference in a new issue