Пример #1
0
def delete_article(data, driver, redis, id):
	if data['site'] == 'olx.ua':
		delete_method = del_olx
		delete_method(data['article'], data['username'], data['password'], driver, redis, id)
	if data['site'] == 'address.ua':
		manage_address(data['article'], driver, data['username'], data['password'], redis, id, 'del')
	if data['site'] == 'mirkvartir.ua':
		manage_mirkvartir(data['article'], driver, data['username'], data['password'], redis, id, 'del')
	if data['site'] == 'fn.ua':
		manage_fn(data['article'], driver, data['username'], data['password'], redis, id, 'del')
	if data['site'] == 'aviso.ua':
		manage_aviso(data['article'], driver, data['username'], data['password'], redis, id, 'del')
Пример #2
0
def find_status(data, driver, redis, id):
	if data['site'] == 'olx.ua':
		status_method = stat_olx
	if data['site'] == 'address.ua':
		return manage_address(data['article'], driver, data['username'], data['password'], redis, id, 'status')
	if data['site'] == 'mirkvartir.ua':
		return manage_mirkvartir(data['article'], driver, data['username'], data['password'], redis, id, 'status')
	if data['site'] == 'fn.ua':
		return manage_fn(data['article'], driver, data['username'], data['password'], redis, id, 'status')
	if data['site'] == 'aviso.ua':
		return manage_aviso(data['article'], driver, data['username'], data['password'], redis, id, 'status')

	return status_method(data['article'], data['username'], data['password'], driver, redis, id)