Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Only crawl 1 following or followers #21

Open
wangchust opened this issue Nov 9, 2017 · 2 comments
Open

Only crawl 1 following or followers #21

wangchust opened this issue Nov 9, 2017 · 2 comments

Comments

@wangchust
Copy link

wangchust commented Nov 9, 2017

I only get 1 following or followers when set -n to 20
I analyse the xml code of instagram and find something wrong with line 273 num_of_shown_follow = len(List.find_elements_by_xpath('*'))
In instagram, xml structure is showed as follows:
ul>
div>
li>'follow info'<\li>
...
li>'another follow info'<\li>
\div>
\ul>
Here class List is node ul
and we want info of node li
The problem is line 273 get node div
I changed line 273s to List.find_elements_by_tag_name('li') and solved this problem.
Hope may help others.

@drquesada
Copy link

drquesada commented Jan 3, 2018

Thanks @wangchust (and of course @iammrhelo), it did help! I would add that replacing
List.find_elements_by_xpath('*')
by
List.find_elements_by_tag_name('li')
should also be done in lines 274, 275 and 283. With this everything works for me and the comment in line 276 can be removed :)

@mikkelduif
Copy link

Thanks @elquesada - works for me, however, seems like the problems is that the scroll-down execution doesn't work. I get the full list if I scroll down manually through the list while the script is running. Does anyone know what to edit in order for the script to scroll down the follower list?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants