def get_list_of_all_works(self, url):
artist_name = self.get_artist_name(url)
school = self.get_school(url)
logging.basicConfig(filename=f'{path}/{school}/{artist_name}/list_of_all_works_of_{artist_name}.log', level=logging.INFO, format=FORMAT)
soup = self.get_soup(url)
arts = soup.find_all('li', class_='painting-list-text-row')
for link in arts:
img = BASE_URL + link.a['href']
title = link.text.replace(', ?', '')
logging.info(img)
return
logging.basicConfig(filename=f'{path}/{school}/{artist_name}/list_of_all_works_of_{artist_name}.log', level=logging.INFO, format=FORMAT)
def __init__(self):
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
datefmt='%m-%d %H:%M',
filename=test.log',
filemode='w'
)
self.console = logging.StreamHandler()
self.console.setLevel(logging.DEBUG)
self.formatter = logging.Formatter('%(asctime)s %(name)-12s: %(levelname)-8s %(message)s<br>')
self.console.setFormatter(self.formatter)
logging.getLogger('').addHandler(self.console)
self.log = logging.getLogger('test')
self.all_data.append([
self.img_url,
self.item_title,
self.item_url,
self.item_location[0],
self.item_price,
self.item_add_info,
self.item_descripton
])
.....
return self.all_data
...
paginator = Paginator(s.all_data, 3)
page = request.GET.get('page')
pagination = paginator.get_page(page)
context = {
# 'property_type_radio' : type_,
# 'url' : url,
'pagination' : pagination,
}
а 6.1. не одно и то же с 7?