Skip to content

Commit

Permalink
Convert github links to raw
Browse files Browse the repository at this point in the history
  • Loading branch information
UltimaHoarder committed May 25, 2021
1 parent 77fd03e commit 259aee9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classes/make_settings.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import copy
from typing import List, Union
from urllib.parse import urlparse
from apis.onlyfans.onlyfans import auth_details
import os

import ujson
from classes.prepare_metadata import format_types
from classes.prepare_metadata import format_types, prepare_reformat
import uuid as uuid

def fix(config={}):
Expand Down Expand Up @@ -75,6 +76,11 @@ def __init__(self, option={}) -> None:
self.exit_on_completion = exit_on_completion
self.infinite_loop = infinite_loop
self.loop_timeout = loop_timeout
if "github.com" in dynamic_rules_link:
if "raw" not in dynamic_rules_link:
parsed_link = urlparse(dynamic_rules_link)
path = parsed_link.path.replace("blob/","")
dynamic_rules_link = f"https://raw.githubusercontent.com/{path}"
self.dynamic_rules_link = dynamic_rules_link
self.proxies = proxies
self.cert = cert
Expand Down

0 comments on commit 259aee9

Please sign in to comment.