def parse_article_id_url(response, url_limit):
    """
    Finds url on novinky.cz with article_id, that satisfies url_limit condition
    :param response: Scrapy response
    :param url_limit:
    :return: URL as str
    """
    # finds first link to article, splits it into subarrays by '-' and takes last element => id of the article
    first_article_id = response.css('div[data-dot="top_clanky"] a::attr(href)')[0].extract().split('-')[-1]

    # calculate article id in the past -> substract (url_limit - 4) why number 4 ?
    # because first 4 articles are not present in the stalo_se timeline
    needed_article_id = int(first_article_id) - abs((int(url_limit) - 4))

    return "https://www.novinky.cz/?timeline-stalose-lastItem=" + str(needed_article_id)