Set cookies to retrieve facebook feeds

This commit is contained in:
Gérald LEBAN 2021-07-13 20:04:51 +02:00
parent f85335adad
commit 2ea7d2328f
2 changed files with 3 additions and 1 deletions

2
facebook/cookies.txt Normal file
View file

@ -0,0 +1,2 @@
.facebook.com TRUE / TRUE 1657583529 c_user 100013449421394
.facebook.com TRUE / TRUE 1657583529 xs 24%3AiZV3_Ie47zUCeQ%3A2%3A1625865146%3A-1%3A11747%3A%3AAcVK2NoHr1I2BOHq0TQNu2omytGt0llyhp-C-oEnCg

View file

@ -8,7 +8,7 @@ PAGES = ["amicale.deseleves", "campus.insat"]
def scrape_data(page):
post_list = []
for post in facebook_scraper.get_posts(page, pages=4):
for post in facebook_scraper.get_posts(page, pages=4, cookies="./cookies.txt"):
print(post)
cleaned_post = {
"id": post["post_id"],