Created
November 5, 2016 15:12
-
-
Save gummibeatz/5438da70fb35e1110297cb9b6fa5e928 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# new algo for grabbing images | |
with open('acl_instagram_testand.txt', 'a') as f: | |
image_src_set = Set() | |
# get image paths | |
while(len(image_src_set) < stop): | |
nodes = driver.find_elements_by_xpath('//div[@class="'+'_ovg3g'+'"]') | |
# get last element of selected nodes | |
node_count = len(nodes) | |
node_count_offset = 1 | |
node = nodes[node_count - node_count_offset] | |
node.click() | |
# check get image src value | |
image_src_value = get_image_src_value() | |
while(image_src_value not in image_src_set): | |
image_src_set.add(image_src_value) | |
grab_user_post(f) | |
click_left_arrow() | |
image_src_value = get_image_src_value() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment