InstagramCrawler
InstagramCrawler copied to clipboard
Only crawl 1 following or followers
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.
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 :)
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?