R
R
Roman Gor2017-10-30 14:32:40
Facebook
Roman Gor, 2017-10-30 14:32:40

How to parse Facebook correctly?

Salute to all ✌️
Are there people who can parse Facebook?
Task:
get photos from fb by keywords
My tools:
Protractor + ChromeWebDriver
after login I store cookies, reset them randomly in the range of 10-15 days
Lifecycle of the bot:
0. open chrome with protractor
1. go to the main fb
2. if there are no cookies, I log in, if there is, I go to the profile page
3. in the search I write the desired keyword
4. go to the "photo" tab
5. specify the filter parameters (location, date)
6. wait for the result to load
7. scroll the result to the very bottom (to collect all photos for the specified date)
8. rake out links
9. close chrome
Problems:
1. blocks new, fresh accounts almost immediately
2. left his personal account, at first he cursed, saying "you came from somewhere, is it you?", but it didn't last very long, it was approved a couple of times and stopped. A week later, the search for me stupidly stopped working. it writes "not found" to any request, I think the search was blocked for me, temporarily or not - xs. I wrote to support, gave a ticket to the community, so far I'm waiting for an answer.
Ideas / thoughts:
1. I think we need to make the bot "alive", i.e., in addition to the fact that he just has to go on the search, you need to let him walk on the news feed, mb, like something, mb, add friends etc.
2. my bot runs roughly every 20 minutes. i.e., in knocks it is launched approximately 24 * (60/20) = 72 times. what is important: for each process, a new chrome window opens (consider a new session) and after collecting everything you need, it closes. I think to reduce the number of requests, about 2 times, within 30-40 leave. besides, try to do all the work in one browser window and not close it. each new process open in a new tab, then close it.
Actually, what I'm looking for and why I'm writing:
I want to discuss my animal with people who did something similar, mb, not necessarily for Facebook in order to get information about some hidden features, hacks, best practices.
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
megastudio, 2018-05-18
@megastudio

There are online-type solutions, such as: Snail, fb-parser.com, aparser.com, etc. If you do not need excel files with contacts from FB, then I recommend using the API, which, however, only the Snail had. At the moment, I am satisfied with the second service from the above.

D
Dimonchik, 2017-10-30
@dimonchik2013

browser fingerprint
, but in general, FB has a strong ML, VKontakte has all sorts too, but other tasks are
therefore difficult with FB / Instay

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question