import requests
from bs4 import BeautifulSoup

def trade_spider(max_pages):
    page = 1
    while page <= max_pages:
        url = 'http://www.finn.no/finn/mc/used/result?MC_MODEL/MAKE=7771&page=' + str(page)
        source_code = requests.get(url)
        plain_text = source_code.text
        soup = BeautifulSoup(plain_text)
        for link in soup.findAll('a', {'data-fth-event': 'searchclickthrough'}):
            href = link.get('href')
            title = link.string
            #print(href)
            #print(title)
            get_single_item_data(href)
        page += 1


def get_single_item_data(item_url):
    source_code = requests.get(item_url)
    plain_text = source_code.text
    soup = BeautifulSoup(plain_text)
    for item_info in soup.findAll('h1', {'class': 'r-margin'}):
        print(item_info.string)


trade_spider(1)


Hey, does anybody knows why its printing the names two times like this: 

KTM exc 200 2 takt 2003, 5 200 km, kr 35 000,-
KTM exc 200 2 takt 2003, 5 200 km, kr 35 000,-
KTM Duke 125 2013, 6 600 km, kr 45 000,-
KTM Duke 125 2013, 6 600 km, kr 45 000,-
KTM sx 85 2007, kr 15 000,-
KTM sx 85 2007, kr 15 000,-
? thank you for your help