V
V
Vlad2422018-12-21 22:27:28
Python
Vlad242, 2018-12-21 22:27:28

I am writing a parser. There are no errors in the console, but the console itself is empty (sometimes writes none several times) What should I do?

I am writing a parser. I click to start parsing, but nothing happens in the paycharm console (it is completely empty). There are no errors.
What should I do? Here is the
upd code:
on another site in the console it already writes only none several times

import requests
from bs4 import BeautifulSoup

def trade_spiders (max_page):
    page = 1
    while page <= max_page:
        url = 'http://www.new-baskino.club/' + str(page)
        source_code = requests.get(url)
        plain_text = source_code.text
        soup = BeautifulSoup(plain_text, 'html.parser')
        for link in soup.findAll('a', {"class": "posttitle"}):
            href = link.get('href')
            print(href)
        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 question

Ask a Question

731 491 924 answers to any question