forked from MarseyWorld/MarseyWorld
fddf
parent
d5986097cb
commit
51fa1d60f8
|
@ -605,8 +605,9 @@ def submit_post(v):
|
||||||
else: embed = f"https://youtube.com/embed/{yt_id}"
|
else: embed = f"https://youtube.com/embed/{yt_id}"
|
||||||
|
|
||||||
elif "instagram.com" in domain:
|
elif "instagram.com" in domain:
|
||||||
try: embed = requests.get("https://graph.facebook.com/v9.0/instagram_oembed", params={"url":url,"access_token":environ.get("FACEBOOK_TOKEN","").strip(),"omitscript":'true'}, headers={"User-Agent": app.config["UserAgent"]}).json()["html"]
|
pembed = requests.get("https://graph.facebook.com/v9.0/instagram_oembed", params={"url":url,"access_token":environ.get("FACEBOOK_TOKEN","").strip(),"omitscript":'true'}, headers={"User-Agent": app.config["UserAgent"]}).json()
|
||||||
except: embed = None
|
try: embed = pembed["html"]
|
||||||
|
except: print(pembed)
|
||||||
|
|
||||||
elif app.config['SERVER_NAME'] in domain and "/post/" in url:
|
elif app.config['SERVER_NAME'] in domain and "/post/" in url:
|
||||||
id = url.split("/post/")[1]
|
id = url.split("/post/")[1]
|
||||||
|
|
Loading…
Reference in New Issue