0
私は最初のpython web crawlerを作成しようとしました(thenewbostonから学んでいます)。私はすべてのエラーメッセージを取得いけない、だけでなく、何も出力.. はHERESに私のコード:Python web crawler no output
import requests
from bs4 import BeautifulSoup
def sportpoint_spider(max_pages):
page = 1
while page <= max_pages:
url = 'http://www.sportpoint.lt/vyrams-1?page=' + str(page)
source_code = requests.get(url)
plain_text = source_code.text
soup = BeautifulSoup(plain_text, "html.parser")
for link in soup.findAll('a', {'atl '}):
href = link.get('href')
print(href)
page += 1
sportpoint_spider(1)
'plain_text = source_code.text'の後に' print(plain_text) '文を追加して結果を投稿できますか? – kvorobiev
すべてのウェブサイトのテキスト、クラスなどを印刷しました(検査要素のすべてのテキスト) – pijasas
希望する出力は何ですか? –