-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuntitled4.py
More file actions
41 lines (27 loc) · 1 KB
/
untitled4.py
File metadata and controls
41 lines (27 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 18 13:12:45 2021
@author: bhupendra.singh
"""
import os
from selenium import webdriver
from selenium.webdriver.common.by import By
import time #replace with selenium wait
from webdriver_manager.chrome import ChromeDriverManager
os.chdir('C:/Users/bhupendra.singh/Documents/GitHub/fetchResearchersPublications')
authorId = 57221459727
url = "https://www.scopus.com/authid/detail.uri?authorId=" + str(authorId)
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
options.add_argument("--disable-blink-features=AutomationControlled")
driver = webdriver.Chrome(ChromeDriverManager().install() , options=options)
driver.get(url)
driver.refresh()
time.sleep(10)
articles = driver.find_elements(By.XPATH, '//els-paginator[@totalamount]') #Authors lists
a = articles[0].text
b = a.split()
c = b.index('Next')
print("Count = " + b[c-1])
driver.quit()