Skip to content
Snippets Groups Projects
Commit 7bc1c432 authored by martin.zumr's avatar martin.zumr
Browse files

[FIX] use python request instead of urllib

parent bb929604
No related branches found
No related tags found
3 merge requests!607Pirati.cz,!592[ADD] update_articles command,!575Feature/pirati cz
Pipeline #9475 passed
......@@ -2,7 +2,7 @@ import json
import logging
from typing import TYPE_CHECKING
import urllib3
import requests
from article_import_utils.utils import create_image_from_url
from main.models import MainArticlePage, MainArticlesPage, ARTICLE_TYPES
......@@ -21,8 +21,8 @@ class ArticleDownloadService:
return MainArticlePage.objects.filter(article_type=ARTICLE_TYPES.WORK_TIMELINE).values_list('slug', flat=True)
def get_articles_response(self):
response = urllib3.PoolManager().request('GET', self.api_url)
data = json.loads(response.data)
response = requests.get(self.api_url)
data = json.loads(response.text)
return data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment