Skip to content

Commit de2e994

Browse files
committed
add readme
1 parent 9969137 commit de2e994

4 files changed

Lines changed: 29 additions & 25 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ In this repository, I have uploaded all the exercise and project that I have don
1111

1212
<hr>
1313

14-
##### Installing tool
15-
<p>Installing this tool down below.</p>
14+
##### Installing tools
15+
<p>Installing this tools down below.</p>
1616
<ul>
1717
<li>pip 22.3.1</li>
1818
<li>selenium 4.5.0</li>

day10/daraz.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
driver = webdriver.Chrome( service=Service(ChromeDriverManager().install()))
1111
driver.get('https://www.daraz.com.bd/men-muslim-wear/?spm=a2a0e.home.cate_4.4.573f12f7aiGQf3')
1212

13-
xPath = '//*[@id="root"]/div/div[3]/div/div/div[1]/div[2]/div[1]/div/div/div[2]/div[2]/a'
1413

14+
product_title_list= []
1515
title = web_wait(driver, 20).until(EC.presence_of_element_located((By.XPATH, xPath)))
1616

17-
for i in range(1, 40)
18-
19-
print(title.text)
17+
for i in range(1, 40):
18+
xPath = "//*[@id='root']/div/div[3]/div/div/div[1]/div[2]/div[1]/div/div/div[2]/div[2]/a"
19+
product_title_list.append(title.text)
20+
21+
print(product_title_list)

day10/perfunence.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,21 @@
77
from selenium.webdriver.support.ui import WebDriverWait as web_wait
88
from selenium.webdriver.support import expected_conditions as EC
99

10-
drive = webdriver.chrome( service(ChromeDriverManager().install()))
10+
11+
12+
driver = webdriver.Chrome( service =Service(ChromeDriverManager().install()))
13+
driver.get('https://perfumancebd.com/')
14+
15+
#xpath = '//*[@id="rig-adpr"]/div[1]/p[1]'
16+
#title = web_wait(driver, 20).until(EC.presence_of_element_located((By.XPATH, xpath)))
17+
#print(title.text)
18+
19+
listOfData = []
20+
n = 9
21+
for i in range(n):
22+
xpath = '//*[@id="rig-adpr"]/div["+str(i)+"]/p[1]'
23+
title = web_wait(driver, 20).until(EC.presence_of_element_located((By.XPATH, xpath)))
24+
listOfData.append(title.text)
25+
26+
print("value of list", listOfData)
27+

day7/day_7_screpSelenium.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,18 @@
33
from webdriver_manager.chrome import ChromeDriverManager
44
from selenium.webdriver.common.by import By
55

6-
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
7-
86

7+
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
98
driver.get('https://www.amazon.com/dp/B0B4GC9TJT?ref_=nav_em__k_ods_eink_kke_0_2_3_2')
109

1110

1211
#variable diclearation
13-
14-
15-
16-
1712
Title = driver.find_element(by=By.XPATH, value='//*[@id="productTitle"]').text
1813
img = driver.find_element(by=By.XPATH, value='//*[@id="landingImage"]').get_attribute('src')
1914
rating = driver.find_element(by=By.XPATH, value='//*[@id="acrPopover"]/span[1]/a/i[1]/span').get_attribute('innerHTMl')
2015

21-
list_of_Data = [Title, img, rating]
22-
23-
24-
# test for list
25-
26-
a = 'hello world'
27-
f = 34
28-
d = 'fun'
29-
g = 'go'
30-
h = 12
31-
test = [a, f, d, g, h]
32-
16+
# Add on the list
17+
list_of_Data = ["Title: ",Title,"image:", img, "Rating: ", rating]
3318
print(list_of_Data)
3419

3520

0 commit comments

Comments
 (0)