<commit_before>import logging
import requests
from django.conf import settings

from common.util import slugify

LOGGER = logging.getLogger(__name__)
STEAM_API_URL = "http://api.steampowered.com/"


def get_capsule(steamid):
    steam_cdn = "http://cdn.akamai.steamstatic.com"
    capsule_url = steam_cdn + "/steam/apps/%d/capsule_184x69.jpg"
    response = requests.get(capsule_url % steamid)
    return response.content


def get_image(appid, img_logo_url):
    img_url = (
        "http://media.steampowered.com/"
        "steamcommunity/public/images/apps/{}/{}.jpg".format(
            appid, img_logo_url
        )
    )
    response = requests.get(img_url)
    return response.content


def steam_sync(steamid):
    get_owned_games = (
        "IPlayerService/GetOwnedGames/v0001/"
        "?key={}&steamid={}&format=json&include_appinfo=1"
        "&include_played_free_games=1".format(
            settings.STEAM_API_KEY, steamid<commit_msg>Use HTTPS for api.steampowered.com<commit_after>import logging
import requests
from django.conf import settings

from common.util import slugify

LOGGER = logging.getLogger(__name__)
STEAM_API_URL = "https://api.steampowered.com/"


def get_capsule(steamid):
    steam_cdn = "http://cdn.akamai.steamstatic.com"
    capsule_url = steam_cdn + "/steam/apps/%d/capsule_184x69.jpg"
    response = requests.get(capsule_url % steamid)
    return response.content


def get_image(appid, img_logo_url):
    img_url = (
        "http://media.steampowered.com/"
        "steamcommunity/public/images/apps/{}/{}.jpg".format(
            appid, img_logo_url
        )
    )
    response = requests.get(img_url)
    return response.content


def steam_sync(steamid):
    get_owned_games = (
        "IPlayerService/GetOwnedGames/v0001/"
        "?key={}&steamid={}&format=json&include_appinfo=1"
        "&include_played_free_games=1".format(
            settings.STEAM_API_KEY, steamid
{'fraction_non_alphanumeric': 0.11966701352757544, 'fraction_numerical': 0.011446409989594173, 'mean_word_length': 3.3904109589041096, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7616795', 'n_tokens_mistral': 696, 'n_tokens_neox': 653, 'n_words': 98}