{"id":16330067,"url":"https://github.com/rmax/scrapydo","last_synced_at":"2025-10-06T23:40:11.723Z","repository":{"id":35484266,"uuid":"39753390","full_name":"rmax/scrapydo","owner":"rmax","description":"Crochet-based blocking API for Scrapy.","archived":false,"fork":false,"pushed_at":"2017-02-24T03:19:26.000Z","size":115,"stargazers_count":46,"open_issues_count":4,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-18T08:07:28.900Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rmax.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-27T03:34:19.000Z","updated_at":"2022-10-25T13:02:36.000Z","dependencies_parsed_at":"2022-08-31T04:53:25.965Z","dependency_job_id":null,"html_url":"https://github.com/rmax/scrapydo","commit_stats":null,"previous_names":["rolando/scrapydo"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/rmax/scrapydo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmax%2Fscrapydo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmax%2Fscrapydo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmax%2Fscrapydo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmax%2Fscrapydo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmax","download_url":"https://codeload.github.com/rmax/scrapydo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmax%2Fscrapydo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261004421,"owners_count":23095710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T23:18:23.540Z","updated_at":"2025-10-06T23:40:06.707Z","avatar_url":"https://github.com/rmax.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"ScrapyDo\n========\n\nCrochet_-based blocking API for Scrapy_.\n\nThis module provides function helpers to run Scrapy_ in a blocking fashion. See\nthe `scrapydo-overview.ipynb \u003chttp://nbviewer.ipython.org/github/darkrho/scrapydo/blob/master/notebooks/scrapydo-overview.ipynb\u003e`_\nnotebook for a quick overview of this module.\n\n\nInstallation\n============\n\nUsing ``pip``::\n\n  pip install scrapydo\n\n\nUsage\n=====\n\nThe function ``scrapydo.setup`` must be called once to initialize the reactor.\n\nExample:\n\n.. code:: python\n\n    import scrapydo\n    scrapydo.setup()\n\n    scrapydo.default_settings.update({\n        'LOG_LEVEL': 'DEBUG',\n        'CLOSESPIDER_PAGECOUNT': 10,\n    })\n\n    # Enable logging display\n    import logging\n    logging.basicConfig(level=logging.DEBUG)\n\n    # Fetch a single URL.\n    response = scrapydo.fetch(\"http://example.com\")\n\n    # Crawl an URL with given callback.\n    def parse_page(response):\n        yield {\n            'title': response.css('title').extract(),\n            'url': response.url,\n        }\n        for href in response.css('a::attr(href)'):\n            url = response.urljoin(href)\n            yield Request(url, callback=parse_page)\n\n    items = scrapydo.crawl('http://example.com', callback)\n\n    # Run an existing spider class.\n    spider_args = {'foo': 'bar'}\n    items = scrapydo.run_spider(MySpider, **spider_args)\n\n\nAvailable Functions\n===================\n\n``scrapydo.setup()``\n    Initialize reactor.\n\n``scrapydo.fetch(url, spider_cls=DefaultSpider, capture_items=True, return_crawler=False, settings=None, timeout=DEFAULT_TIMEOUT)``\n    Fetches an URL and returns the response.\n\n``scrapydo.crawl(url, callback, spider_cls=DefaultSpider, capture_items=True, return_crawler=False, settings=None, timeout=DEFAULT_TIMEOUT)``\n    Crawls an URL with given callback and returns the scraped items.\n\n``scrapydo.run_spider(spider_cls, capture_items=True, return_crawler=False, settings=None, timeout=DEFAULT_TIMEOUT, **kwargs)``\n    Runs a spider and returns the scraped items.\n\n``highlight(code, lexer='html', formatter='html', output_wrapper=None)``\n    Highlights given code using pygments. This function is suitable for use in a IPython notebook.\n\n\n.. _Scrapy: http://scrapy.org\n.. _Crochet: https://github.com/itamarst/crochet\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmax%2Fscrapydo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmax%2Fscrapydo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmax%2Fscrapydo/lists"}