Created
March 10, 2020 17:09
-
-
Save Porter97/60ec782a1967183f73eb8fc1b7e5dd92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#... | |
import opengraph | |
#... | |
@app.cli.command() | |
def update_images(): | |
content = Content.query.all() | |
for x in content: | |
og = opengraph.OpenGraph(url=x.url) | |
x.image = og.image | |
x.add_fields_to_stream(image=og.image) | |
db.session.commit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment