lex-2008 / facebook2email Goto Github PK
View Code? Open in Web Editor NEWForward posts from selected groups to your email
License: GNU General Public License v2.0
Forward posts from selected groups to your email
License: GNU General Public License v2.0
Hey there,
I'm really liking the look of your code, I need something like this for scraping a club facebook and posting to our website for group posts. I would appreciate any suggestions you could make to get this to work.
I installed and had issues getting vnc to connect, it won't accept connections.
I tried running without that step but get the below when trying the cron job
docker run --rm -v /opt/brgc/facebook2email:/data --shm-size=2g ultrafunk/undetected-chromedriver /data/script.py
running keepUpScreen() sleeping starting opening sleeping working working on 28 posts Traceback (most recent call last): File "/data/script.py", line 54, in <module> post_urls = [x.attrs['href'].split('?')[0] for x in post_links if '/permalink/' in x.attrs['href']] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/script.py", line 54, in <listcomp> post_urls = [x.attrs['href'].split('?')[0] for x in post_links if '/permalink/' in x.attrs['href']] ~~~~~~~^^^^^^^^ KeyError: 'href'
Trying to build a way to recover as a service. Doesn't seem to wait the way I'm expecting for the driver load and since I'm basing it on your code, do you have any suggestions?
#!/bin/bash
IMAGE_NAME="ultrafunk/undetected-chromedriver"
# Find running containers matching the image name
CONTAINERS=$(docker ps -a --format '{{.ID}} {{.Image}}' | grep $IMAGE_NAME | awk '{print $1}')
if [ -z "$CONTAINERS" ]; then
echo "No running containers found for $IMAGE_NAME"
else
echo "Stopping running containers for $IMAGE_NAME..."
# Stop each container one by one
for CONTAINER in $CONTAINERS; do
docker stop $CONTAINER
echo "Container $CONTAINER stopped."
done
fi
docker run --rm -d -v /opt/brgc/facebook2email:/data -p 5900:5900 --shm-size=2g ultrafunk/undetected-chromedriver bash -c 'x11vnc >x11vnc.log 2>&1 & sleep 5 && python -c "import undetected_chromedriver as uc; driver = uc.Chrome(advanced_elements=True, user_data_dir='/data/profile')" && sleep 5'
docker run --rm -v /opt/brgc/facebook2email:/data --shm-size=2g ultrafunk/undetected-chromedriver /data/scriptmg2.py
#>last.log 2>&1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.