Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("============================================================================================")
- print("\n")
- print("======================================WELCOME TO ON POINT======================================================")
- from selenium import webdriver
- import time
- import bs4
- from bs4 import BeautifulSoup as soup
- b1=input("enter the text to be searched\n")
- driver = webdriver.Firefox()
- #ieee explore===============================================================
- urlieee="https://ieeexplore.ieee.org/search/searchresult.jsp?newsearch=true&queryText="
- b2ieee=b1.replace(" ","%20")
- urlieee=urlieee+b2ieee
- driver.get(urlieee)
- time.sleep(5)
- refsieee=driver.page_source
- pagesoup=soup(refsieee,"html.parser")
- containers=pagesoup.findAll("div",{"class":"Dashboard-header col-12"})
- print(containers)
- #print(containers[0].span.span.next_sibling.next_sibling.text)
- countieee = 0
- #sciencedirect==============================================================
- urlsd="https://www.sciencedirect.com/search?qs="
- b3sd="&show=25&sortBy=relevance"
- b2sd=b1.replace(" ","%20")
- urlsd=urlsd+b2sd+b3sd
- time.sleep(2)
- driver.get(urlsd)
- refssd=driver.page_source
- pagesoup=soup(refs,"html.parser")
- countsd=0
- #scienceopen=================================================================
- urlso="https://www.scienceopen.com/search#('v'~3_'id'~''_'isExactMatch'~true_'context'~null_'kind'~77_'order'~0_'orderLowestFirst'~false_'query'~'"
- b2so=b1.replace(" ","%20")
- b3so="'_'filters'~!*)"
- urlso=urlso+b2so+b3so
- time.sleep(2)
- driver.get(urlso)
- refsso=driver.page_source
- pagesoup=soup(refs,"html.parser")
- countso=0
- #========================================================================================================================
- print("\n")
- print("\n")
- print("============================================================================================")
- print("IEEE ("+ str(countieee)+")")
- print("SCIENCE DIRECT "+ str(countsd))
- print("SCIENCE OPEN "+ str(countso))
- print("\n")
- print("============================================================================================")
Add Comment
Please, Sign In to add comment