def scrape_scripts(num):
    res = requests.get(
            'http://www.vim.org/scripts/script_search_results.php?show_me=%d' %
                num)

    html = lxml.html.html5parser.document_fromstring(res.text, parser=PARSER)

    # Since there are no identifying classes or ids, this is the best way to
    # find the correct table
    scripts = html.xpath('//table[tbody/tr/th[contains(text(),"Script")]]/*/*')

    # the first two rows and the last row aren't scripts
    for tr in scripts[2:-1]:
        link = tr[0][0].attrib['href']

        vimorg_id = re.search("script_id=(\d+)", link).group(1)
        name = tr[0][0].text.encode('utf-8')

        # Print w/o newline.
        print "    scraping %s (vimorg_id=%s) ..." % (name, vimorg_id),
        sys.stdout.flush()

        # TODO(david): Somehow also get a count of how many plugins failed to
        #     be scraped in total. Maybe return a tuple with error status.
        # TODO(david): Fix error scraping vimcat (id=4325) (something about
        #     only unicode and ascii allowed, no null bytes or control chars)
        try:
            # Merge the data we get here with extra data from the details page.
            plugin = dict({
                "vimorg_url": "http://www.vim.org/scripts/%s" % link,
                "vimorg_id": vimorg_id,
                "vimorg_name": tr[0][0].text,
                "vimorg_type": tr[1].text,
                "vimorg_rating": int(tr[2].text),
                "vimorg_downloads": int(tr[3].text),
                "vimorg_short_desc": tr[4][0].text,
            }, **get_plugin_info(vimorg_id))

            query = r.table('submitted_plugins').get_all(vimorg_id,
                    index='vimorg_id').filter(
                            r.row['rejected'] != True, default=True)  # NOQA
            submission = db.util.get_first(query)
            db.plugins.add_scraped_data(plugin, submission=submission)
            print "done"
        except Exception:
            logging.exception(
                    '\nError scraping %s (vimorg_id=%s) from vim.org' %
                    (name, vimorg_id))
! Unregisters host test object by name
dataset/ETHPy150Open vim-awesome/vim-awesome/tools/scrape/vimorg.py/scrape_scripts--crossover with--dataset/ETHPy150Open ARMmbed/htrun/mbed_host_tests/host_tests_registry/host_registry.py/HostRegistry.unregister_host_test