No video

Python - FB scraper

  Рет қаралды 8,409

Wirote Aroonmanakun

Wirote Aroonmanakun

Күн бұрын

##Python code for this video
import json
from facebook_scraper import get_posts, set_noscript
from facebook_scraper import get_group_info
ginfo = get_group_info("VenomousAndOtherSnakesOfSiam")
print(ginfo['id'])
#479127595592229
We need to login Facebook with this account in a browser before running the code.
listposts=[]
#for post in get_posts("nintendo", pages=2):
posts = get_posts(post_urls=[" / 1874763812695260 "," / 1875124055992569 "], credentials=('FB_ACCOUNT@gmail.com','FB_PASSWORD'), options={"comments":True})
for post in posts:
print post on the screen
print(json.dumps(post,indent=2, default=str))
for x in post:
print(x, post[x])
print json object to file one object/post per line
with open('fb.json', 'a', encoding='utf-8') as f:
json.dump(post, f, ensure_ascii=False, default=str)
f.write("
")
print(post['post_text'])
for cmt in post['comments_full']:
print(cmt['commenter_name']," : ", cmt['comment_text'].replace("
",""))

Пікірлер: 4
@mdb304
@mdb304 Жыл бұрын
Good Video. Thanks!
@khthana
@khthana 10 ай бұрын
มันดึงมาได้หลาย Post มั้ยครับ ถ้าเป็นร้อยๆ
@mohammedchaaraoui7848
@mohammedchaaraoui7848 2 жыл бұрын
can give the source code plz i need it !!!
@real.jibrankhan
@real.jibrankhan Жыл бұрын
WTF is this language :(
XSS Automation #BugBounty
5:52
Muhammad Waseem
Рет қаралды 1,6 М.
WILL IT BURST?
00:31
Natan por Aí
Рет қаралды 28 МЛН
Kind Waiter's Gesture to Homeless Boy #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 15 МЛН
Underwater Challenge 😱
00:37
Topper Guild
Рет қаралды 37 МЛН
I make Iphone in neal.fun .
5:29
Dar_gamer
Рет қаралды 62
Network Hacking | ftp orqali backdoor
23:13
Kursor uz
Рет қаралды 144
แปล A Poison Tree เป็นโคลงสี่สุภาพ
2:15
Next Auth 3
7:11
IT-ELEVEN
Рет қаралды 4
01. All Web Challenges walkthroughs
28:44
CyberBullet
Рет қаралды 124