File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -76,15 +76,14 @@ requests will be processed by the regular Scrapy download handler.
7676
7777### Twisted reactor
7878
79- When running on GNU/Linux or macOS you'll need to
80- [ install the ` asyncio ` -based Twisted reactor] ( https://docs.scrapy.org/en/latest/topics/asyncio.html#installing-the-asyncio-reactor ) :
79+ [ Install the ` asyncio ` -based Twisted reactor] ( https://docs.scrapy.org/en/latest/topics/asyncio.html#installing-the-asyncio-reactor ) :
8180
8281``` python
8382# settings.py
8483TWISTED_REACTOR = " twisted.internet.asyncioreactor.AsyncioSelectorReactor"
8584```
8685
87- This is not a requirement on Windows (see [ Windows support ] ( #windows-support ) )
86+ This is the default in new projects since [ Scrapy 2.7 ] ( https://github.com/scrapy/scrapy/releases/tag/2.7.0 ) .
8887
8988
9089## Basic usage
Original file line number Diff line number Diff line change 11import asyncio
22import logging
3- import platform
43from contextlib import suppress
54from dataclasses import dataclass , field as dataclass_field
65from ipaddress import ip_address
@@ -132,8 +131,7 @@ class ScrapyPlaywrightDownloadHandler(HTTPDownloadHandler):
132131 def __init__ (self , crawler : Crawler ) -> None :
133132 super ().__init__ (settings = crawler .settings , crawler = crawler )
134133 _ThreadedLoopAdapter .start ()
135- if platform .system () != "Windows" :
136- verify_installed_reactor ("twisted.internet.asyncioreactor.AsyncioSelectorReactor" )
134+ verify_installed_reactor ("twisted.internet.asyncioreactor.AsyncioSelectorReactor" )
137135 crawler .signals .connect (self ._engine_started , signals .engine_started )
138136 self .stats = crawler .stats
139137
You can’t perform that action at this time.
0 commit comments