VariabileAleatoria / Telegram-Facebook-Pages-Bot

Telegram bot which sends posts from a list of Facebook Pages to a Telegram channel.
GNU General Public License v3.0
29 stars 15 forks source link

EXPLINATION #2

Closed venomega closed 3 years ago

venomega commented 3 years ago

hello i dont know if its just me, but i dont understand what i have to put on pages.csv could you plese provide more technical info, and if posible, an example too i will apreciate it

venomega commented 3 years ago

it`s not just pages.csv, how would i know how should i pass arguments without a help

[root@aincrad Telegram-Facebook-Pages-Bot]# python3 scraper.py  --help
Traceback (most recent call last):
  File "/srv/Telegram-Facebook-Pages-Bot/scraper.py", line 46, in <module>
    check()
  File "/srv/Telegram-Facebook-Pages-Bot/scraper.py", line 28, in check
    for post in get_posts(page['page_tag'], pages=1):
  File "/usr/lib/python3.9/site-packages/facebook_scraper/__init__.py", line 49, in get_posts
    raise ValueError("You need to specify either account, group, or post_urls")
ValueError: You need to specify either account, group, or post_urls
o20n3 commented 3 years ago

hello i dont know if its just me, but i dont understand what i have to put on pages.csv could you plese provide more technical info, and if posible, an example too i will apreciate it

The first value is just a name which will be added to the Telegram posts. The second value is the name of the facebook page you can see in the url. The final value is a date and time from which you would like the scraper to check. This is in a very specific format so check the readme to make sure you're getting it correct. Each value must be separated by a comma (csv stands for comma separated values). So an example csv would look like this:

page_name | page_tag | last_post_used

My Facebook Bot,cnn,2021-04-10 09:22:22

Edit: I am not the developer, I have just been fiddling around with this for a while and have worked out a few things. I would also like to spend some more time getting it working better than it currently does.

VariabileAleatoria commented 3 years ago

Hi, unfortunately I wrote this bot 2 years ago and haven't used it since then. The example given from @o20n3 is correct. I think the code needs some review because it's almost spaghetti code, I'll try do that in these days and updating the readme to be more comprehensible.

VariabileAleatoria commented 3 years ago

I also added a script to do the config for you, feel free to ask if you have any more doubts