Skip to content

Commit

Permalink
Handle importing Protocol in Python 3.6 and 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
D4Vinci committed Oct 13, 2024
1 parent bb36558 commit c85fabb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scrapling/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
import re

from w3lib.html import HTML5_WHITESPACE
from typing import TYPE_CHECKING, Any, Optional, Protocol
from typing import TYPE_CHECKING, Any, Optional
try:
from typing import Protocol
except ImportError:
# Added in Python 3.8
Protocol = object

from scrapling.utils import cache

Expand Down

0 comments on commit c85fabb

Please sign in to comment.