diff --git a/parser.py b/parser.py index 15aac54..9ecfa21 100644 --- a/parser.py +++ b/parser.py @@ -9,5 +9,9 @@ soup = BeautifulSoup(request.text, "html.parser") top_titles = soup.find_all("a", class_="tag-book-title") - with open('output.txt','w',encoding='utf8') as f: + for books in top_titles: + for book in books: + f.write(book + '\n') + +