Created
November 15, 2022 12:56
-
-
Save charlie-collard/d586b4db5ac02ba8c06211cb3e9769ff to your computer and use it in GitHub Desktop.
This file contains hidden or 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 requests | |
import re | |
import bs4 | |
import base64 | |
import time | |
# mkfifo mypipe | |
# ffmpeg -f image2pipe -c:v mjpeg -i mypipe output.mp4 | |
with open("mypipe", "wb") as f: | |
while True: | |
r = requests.get("https://crowd-jpeg.vercel.app/") | |
soup = bs4.BeautifulSoup(r.text, 'html.parser') | |
f.write(base64.b64decode(soup.find_all('img')[0]["src"])) | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment