import requests
from bs4 import BeautifulSoup


def main_page_setup(search_page, location, sort_type, language):
    """Create soup object for main jobs page"""
    url = f'https://de.indeed.com/Jobs?l={location}&sort={sort_type}' \
                                f'&lang={language}&start={search_page}'
    main_jobs_page = requests.get(url).text
    soup = BeautifulSoup(main_jobs_page, 'lxml')
    return soup