/
githubmirror
/
scrapy
Обзор
Документация
Войти
/
githubmirror
/
scrapy
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/utils/feedexport.py
29 строк
524 B
Andrey Rakhmatullin
Test restructuring (#7736)
21 июл 2026, 13:44
Не верифицирован
21 июл 2026, 13:44
4ee3676
Код
Авторство
О чём код?
from __future__ import annotations from typing import TYPE_CHECKING from urllib.parse import urljoin from urllib.request import pathname2url from scrapy import Field, Item if TYPE_CHECKING: from pathlib import Path def path_to_url(path: str | Path) -> str: return urljoin("file:", pathname2url(str(path))) def printf_escape(s: str) -> str: return s.replace("%", "%%") class MyItem(Item): foo = Field() egg = Field() baz = Field() class MyItem2(Item): foo = Field() hello = Field()