T
T
Tinord2016-09-06 11:07:18
Python
Tinord, 2016-09-06 11:07:18

How to solve the problem with grab?

Hello.
There was a problem with pulling links to the user's avatar. The task is to get the avatars of several thousand users of a certain group. But some answers don't give a link to the avatar. Instead, the answer is given: /images/deactivated_hid_200.gif.
What it is: deactivated_hid_200.gif
Some contacts have indeed been deleted, but there are a lot of accounts that have not been deleted, in which links to real photos are replaced by a link to this image.

from grab import Grab

spider = Grab()
spider.go('https://vk.com/id')

print(spider.doc.select('//img//@src').text())

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tinord, 2016-09-06
@Tinord

Issue resolved.
This answer depends on privacy. Some users hide their account from search engines.
Accordingly, authorization is required to view the avatar.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question