Merge branch 'master' into master
This commit is contained in:
8 files changed
+28
-40
No files matched your search
@@ -0,0 +1 @@
|
||||
Dockerfile
|
||||
@@ -6,3 +6,4 @@ reddit-bot-351418-5560ebc49cac.json
|
||||
video_creation/__pycache__/
|
||||
.setup-done-before
|
||||
__pycache__
|
||||
out
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
FROM mcr.microsoft.com/playwright
|
||||
|
||||
RUN apt update
|
||||
RUN apt install python3-pip -y
|
||||
|
||||
RUN mkdir /app
|
||||
ADD . /app
|
||||
WORKDIR /app
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# tricks for pytube : https://github.com/elebumm/RedditVideoMakerBot/issues/142
|
||||
# (NOTE : This is no longer useful since pytube was removed from the dependencies)
|
||||
# RUN sed -i 's/re.compile(r"^\\w+\\W")/re.compile(r"^\\$*\\w+\\W")/' /usr/local/lib/python3.8/dist-packages/pytube/cipher.py
|
||||
|
||||
CMD ["python3", "main.py"]
|
||||
@@ -43,6 +43,9 @@ These videos on TikTok, YouTube and Instagram get MILLIONS of views across all p
|
||||
7. Enjoy 😎
|
||||
|
||||
|
||||
If you want to see more detailed guide, please refer to the official [documentation](https://immaharry.gitbook.io/reddit-automated-video-bot/).
|
||||
*The Documentation is still being developed and worked on, please be patient as we change / add new knowledge!
|
||||
|
||||
## Contributing & Ways to improve 📈
|
||||
|
||||
In its current state, this bot does exactly what it needs to do. However, lots of improvements can be made.
|
||||
|
||||
+1
-37
@@ -1,44 +1,8 @@
|
||||
appdirs==1.4.4
|
||||
black==20.8b1
|
||||
certifi==2021.10.8
|
||||
charset-normalizer==2.0.12
|
||||
click==7.1.2
|
||||
commonmark==0.9.1
|
||||
decorator==4.4.2
|
||||
flake8==3.8.3
|
||||
greenlet==1.1.2
|
||||
gTTS==2.2.4
|
||||
idna==3.3
|
||||
imageio==2.19.2
|
||||
imageio-ffmpeg==0.4.7
|
||||
mccabe==0.6.1
|
||||
moviepy==1.0.3
|
||||
mutagen==1.45.1
|
||||
mypy-extensions==0.4.3
|
||||
numpy==1.22.3
|
||||
pathspec==0.8.0
|
||||
Pillow==9.1.1
|
||||
playwright==1.22.0
|
||||
praw==7.6.0
|
||||
prawcore==2.3.0
|
||||
proglog==0.1.10
|
||||
pycodestyle==2.6.0
|
||||
pyee==8.1.0
|
||||
pyflakes==2.2.0
|
||||
Pygments==2.12.0
|
||||
python-dotenv==0.20.0
|
||||
|
||||
regex==2020.10.15
|
||||
|
||||
requests==2.27.1
|
||||
rich==12.4.4
|
||||
six==1.16.0
|
||||
toml==0.10.1
|
||||
tqdm==4.64.0
|
||||
typed-ast==1.5.4
|
||||
typing_extensions==4.2.0
|
||||
update-checker==0.18.0
|
||||
urllib3==1.26.9
|
||||
websocket-client==1.3.2
|
||||
websockets==10.1
|
||||
yt-dlp==2022.5.18
|
||||
yt_dlp==2022.5.18
|
||||
@@ -0,0 +1 @@
|
||||
docker run -v $(pwd)/out/:/app/assets -v $(pwd)/.env:/app/.env -it rvmt
|
||||
@@ -1,4 +1,4 @@
|
||||
from playwright.sync_api import sync_playwright
|
||||
from playwright.sync_api import sync_playwright, ViewportSize
|
||||
from pathlib import Path
|
||||
from rich.progress import track
|
||||
from utils.console import print_step, print_substep
|
||||
@@ -31,7 +31,7 @@ def download_screenshots_of_reddit_posts(reddit_object, screenshot_num, theme):
|
||||
# Get the thread screenshot
|
||||
page = context.new_page()
|
||||
page.goto(reddit_object["thread_url"])
|
||||
|
||||
page.set_viewport_size(ViewportSize(width=1920, height=1080))
|
||||
if page.locator('[data-testid="content-gate"]').is_visible():
|
||||
# This means the post is NSFW and requires to click the proceed button.
|
||||
|
||||
@@ -57,4 +57,6 @@ def download_screenshots_of_reddit_posts(reddit_object, screenshot_num, theme):
|
||||
page.locator(f"#t1_{comment['comment_id']}").screenshot(
|
||||
path=f"assets/png/comment_{idx}.png"
|
||||
)
|
||||
print_substep("Screenshots downloaded successfully.", style="bold green")
|
||||
|
||||
print_substep("Screenshots downloaded Successfully.",
|
||||
style="bold green")
|
||||
Reference in new issue
Block a user