|
|
|
|
@ -11,7 +11,7 @@ from robobrowser import RoboBrowser |
|
|
|
|
|
|
|
|
|
from arangodb import db |
|
|
|
|
from config import * |
|
|
|
|
from helpers import sleep_, update_cookie |
|
|
|
|
from helpers import sleep_, update_cookie, clean |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class User: |
|
|
|
|
@ -34,7 +34,7 @@ class User: |
|
|
|
|
db.insert_document( |
|
|
|
|
self.collection, |
|
|
|
|
{ |
|
|
|
|
"_key": self.username, |
|
|
|
|
"_key": clean(self.username), |
|
|
|
|
"url": self.url, |
|
|
|
|
"name": self.name, |
|
|
|
|
"profile_pictures": self.profile_pictures, |
|
|
|
|
@ -197,7 +197,7 @@ class Friend: |
|
|
|
|
db.insert_document( |
|
|
|
|
self.collection, |
|
|
|
|
{ |
|
|
|
|
"_key": self.username, |
|
|
|
|
"_key": clean(self.username), |
|
|
|
|
"url": url_bas + self.url, |
|
|
|
|
"name": self.name, |
|
|
|
|
}, |
|
|
|
|
@ -215,10 +215,10 @@ class Reaction: |
|
|
|
|
self.type = False |
|
|
|
|
|
|
|
|
|
def get_dict(self): |
|
|
|
|
key = str(self.picture_id) + "_" + str(self.user_name_friend) |
|
|
|
|
key = clean(str(self.picture_id) + "_" + str(self.user_name_friend)) |
|
|
|
|
return { |
|
|
|
|
"_to": "members/" + str(self.user), |
|
|
|
|
"_from": "members/" + str(self.user_name_friend), |
|
|
|
|
"_to": "members/" + clean(str(self.user)), |
|
|
|
|
"_from": "members/" + clean(str(self.user_name_friend)), |
|
|
|
|
"_key": key, |
|
|
|
|
"_id": "picture_reactions/" + key, |
|
|
|
|
"picture": self.picture_id, |
|
|
|
|
|