Browse Source

Added instance link (rel=me) && corrected typo

master
Samuel ORTION 12 months ago
parent
commit
d5dd62b3f7
  1. 5
      README.md
  2. 4
      mastaface.py

5
README.md

@ -21,4 +21,7 @@ Copy ```config.json.example``` to ```config.json``` and adjust it to your needs.
Setup a cronjob to run the script periodically. Timelap must be shorter than minimum time difference between two facebook posts.
## Roadmap:
- make changing youtube links to invidios instances a global configurable setting, being able to choose an instance or just let it be youtube.
- make changing youtube links to invidios instances a global configurable setting, being able to choose an instance or just let it be youtube.
## Instance used in:
<a rel="me" href="https://pouet.chapril.org/@cotcot">@cotcot@pouet.chapril.org</a>

4
mastaface.py

@ -106,7 +106,7 @@ for bridge in config['bridges']:
# Upload images if one at least exists and no youtube video is to be linked
if post['image'] and not (type(post['link']) == str and post['link'].find('youtu') != -1):
medias = []
for image in post['images']'
for image in post['images']:
# Using curl is necessary, because facebook's secure-image is very restrictive
subprocess.run(['curl', image, '--output', 'tmp.jpg',
"-H", 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0',
@ -119,7 +119,7 @@ for bridge in config['bridges']:
# unwrapp media ids from list of media_posts (dicts) to list of media ids (list of strings)
media_ids = []
for media in medias
for media in medias:
media_ids.append(media['id'])
# Toot

Loading…
Cancel
Save