Invert inheritance direction
This commit is contained in:
@@ -10,10 +10,10 @@ from praw.models import Submission
|
||||
from bdfr.exceptions import SiteDownloaderError
|
||||
from bdfr.resource import Resource
|
||||
from bdfr.site_authenticator import SiteAuthenticator
|
||||
from bdfr.site_downloaders.gif_delivery_network import GifDeliveryNetwork
|
||||
from bdfr.site_downloaders.redgifs import Redgifs
|
||||
|
||||
|
||||
class Gfycat(GifDeliveryNetwork):
|
||||
class Gfycat(Redgifs):
|
||||
def __init__(self, post: Submission):
|
||||
super().__init__(post)
|
||||
|
||||
@@ -26,8 +26,8 @@ class Gfycat(GifDeliveryNetwork):
|
||||
url = 'https://gfycat.com/' + gfycat_id
|
||||
|
||||
response = Gfycat.retrieve_url(url)
|
||||
if 'gifdeliverynetwork' in response.url:
|
||||
return GifDeliveryNetwork._get_link(url)
|
||||
if re.search(r'(redgifs|gifdeliverynetwork)', response.url):
|
||||
return Redgifs._get_link(url)
|
||||
|
||||
soup = BeautifulSoup(response.text, 'html.parser')
|
||||
content = soup.find('script', attrs={'data-react-helmet': 'true', 'type': 'application/ld+json'})
|
||||
|
||||
Reference in New Issue
Block a user