Answer the question
In order to leave comments, you need to log in
Why doesn't it display the movie title in parsing?
Why doesn't the console show movie titles? but writes None
import requests
from bs4 import BeautifulSoup
def trade_spiders (max_page):
page = 1
while page <= max_page:
url = 'http://new-baskino.club/page/' + str(page)
source_code = requests.get(url)
plain_text = source_code.content
soup = BeautifulSoup(plain_text, 'html.parser')
for link in soup.find_all('div', attrs={"class": "posttitle"}):
href = link.find('a')['href']
print(href)
title = link.string
print(title)
page+=1
trade_spiders(1)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question