Clipboard Watch Mode: watches for a new string on the clipboard, and tries to fetch that URL

def mode_clipboard_watch(options):
    """Clipboard Watch Mode: watches for a new string on the clipboard, and tries to fetch that URL"""
    articles = set()
    failures = set()

    print('Hello, this is news-scraper. Copy a URL to start!')
    print('To quit, press CTRL+C in this window.\n')
    url = pyperclip.paste()
    while True:
        try:
            tmp_value = pyperclip.paste()
            if tmp_value != url:
                url = tmp_value
                print('Fetching article...')
                if options.debug:
                    print("Value changed: %s" % str(url)[:100])

                article = _get_article(url=url, bodyLines=options.bodyLines, debug=options.debug)
                if (article):
                    articles.add(article)
                else:
                    failures.add(url)
                    time.sleep(0.2)
        except KeyboardInterrupt:
            break

    _output(articles, options.outputFile, failures, options.failureFile)