File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ def collectLinks(self, img_url):
30
30
driver = self .driver
31
31
driver .get ("https://www.yandex.com/images/" )
32
32
console .subtask ('Inserting Image URL' )
33
- elems = driver .find_elements_by_xpath ('/html/body/div[1]/div[2]/div[1]/div[1]/div[1]/div/div/div[1]/div[2]/form/div[1]/span/span[2]' )[0 ]
33
+ time .sleep (5 )
34
+ elems = driver .find_elements_by_xpath ('/html/body/div[1]/div[2]/div[1]/div[1]/div[1]/div/div/div/div[1]/div[2]/form/div[1]/span/span[2]' )[0 ]
34
35
elems .click ()
35
36
input = driver .find_elements_by_xpath ('//*[@id="uniq151721871321712645"]' )[0 ]
36
37
@@ -69,9 +70,10 @@ def collectLinksLocal(self):
69
70
for p in pathlist :
70
71
str_p = str (p )
71
72
console .subtask ('Inserting Image URL' )
72
- elems = driver .find_elements_by_xpath ('/html/body/div[1]/div[2]/div[1]/div[1]/div[1]/div/div/div[1]/div[2]/form/div[1]/span/span[2]' )[0 ]
73
+ time .sleep (5 )
74
+ elems = driver .find_elements_by_xpath ('/html/body/div[1]/div[2]/div[1]/div[1]/div[1]/div/div/div/div[1]/div[2]/form/div[1]/span/span[2]' )[0 ]
73
75
elems .click ()
74
- input = driver .find_elements_by_xpath ('/html/body/div[1]/div[2]/div[1]/div[1]/div[1]/div/div/div[4]/div/div[1]/div/form[1]/input' )[0 ]
76
+ input = driver .find_elements_by_xpath ('/html/body/div[1]/div[2]/div[1]/div[1]/div[1]/div/div/div/div [4]/div/div[1]/div/form[1]/input' )[0 ]
75
77
input .clear ()
76
78
p_i = os .path .join (os .getcwd (), str_p )
77
79
input .send_keys (p_i )
You can’t perform that action at this time.
0 commit comments