From c1c97a7ab99c85736cabd6c18b1967d47bd49905 Mon Sep 17 00:00:00 2001 From: bacon Date: Sat, 8 Mar 2025 20:33:43 +0300 Subject: [PATCH] update rss_proxy.py * removed print --- .gitlab-ci.yml | 13 +------------ proxy/rss_proxy.py | 4 +--- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ca8d7e4..2ed2153 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,29 +1,18 @@ workflow: rules: - changes: - - proxy/** + - proxy/**/* - Dockerfile - requirements.txt when: always - - when: never stages: - build - test - push -# test: -# stage: test -# image: python:3.11-alpine -# script: -# - pip install -q -r requirements.txt -# - pip install -q pytest~=8.3.5 -# - python -m unittest discover tests build: - # needs: - # - test - stage: build script: - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_REF_SLUG . diff --git a/proxy/rss_proxy.py b/proxy/rss_proxy.py index 268dbcd..a72f7cf 100755 --- a/proxy/rss_proxy.py +++ b/proxy/rss_proxy.py @@ -88,7 +88,6 @@ def init_proxy(app): title = item.find("title") new_title = re.sub(r'&#\d+', '', title.text) title.text = new_title - # print(title.text) if cached_item: cached_items.append(cached_item.decode()) @@ -99,9 +98,8 @@ def init_proxy(app): if new_guid: print(f"Заменяю GUID: {guid.text} → {new_guid}") guid.attrib.clear() - guid.text = new_guid # 🔹 Теперь подмена делается ДО нормализации + guid.text = new_guid - # 🔹 Теперь нормализуем весь item ПОСЛЕ замены guid normalize_xml_texts(item) item_str = ET.tostring(item, encoding="unicode")