'Return a list of other submissions of the same URL'

@base_listing
@require_oauth2_scope('read')
@validate(article=VLink('article'))
@api_doc(api_section.listings, uri='/duplicates/{article}', supports_rss=True)
def GET_duplicates(self, article, num, after, reverse, count):

    if (not can_view_link_comments(article)):
        abort(403, 'forbidden')
    builder = url_links_builder(article.url, exclude=article._fullname, num=num, after=after, reverse=reverse, count=count)
    if (after and (not builder.valid_after(after))):
        g.stats.event_count('listing.invalid_after', 'duplicates')
        self.abort403()
    num_duplicates = len(builder.get_items()[0])
    listing = LinkListing(builder).listing()
    res = LinkInfoPage(link=article, comment=None, num_duplicates=num_duplicates, content=listing, page_classes=['other-discussions-page'], subtitle=_('other    discussions')).render()
    return res
