joelnazarene

main1

Apr 1st, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.10 KB | None | 0 0
  1. print("============================================================================================")
  2. print("\n")
  3.  
  4. print("======================================WELCOME TO ON POINT======================================================")
  5. from selenium import webdriver
  6. import time
  7. import bs4
  8. from bs4 import BeautifulSoup as soup
  9.  
  10. b1=input("enter the text to be searched\n")
  11. driver = webdriver.Firefox()
  12. #ieee explore===============================================================
  13. urlieee="https://ieeexplore.ieee.org/search/searchresult.jsp?newsearch=true&queryText="
  14. b2ieee=b1.replace(" ","%20")
  15. urlieee=urlieee+b2ieee
  16.  
  17.  
  18. driver.get(urlieee)
  19. time.sleep(5)
  20. refsieee=driver.page_source
  21. pagesoup=soup(refsieee,"html.parser")
  22. containers=pagesoup.findAll("div",{"class":"Dashboard-header col-12"})
  23.  
  24. print(containers)
  25. #print(containers[0].span.span.next_sibling.next_sibling.text)
  26. countieee = 0
  27. #sciencedirect==============================================================
  28.  
  29. urlsd="https://www.sciencedirect.com/search?qs="
  30. b3sd="&show=25&sortBy=relevance"
  31. b2sd=b1.replace(" ","%20")
  32. urlsd=urlsd+b2sd+b3sd
  33. time.sleep(2)
  34. driver.get(urlsd)
  35. refssd=driver.page_source
  36. pagesoup=soup(refs,"html.parser")
  37. countsd=0
  38. #scienceopen=================================================================
  39.  
  40. urlso="https://www.scienceopen.com/search#('v'~3_'id'~''_'isExactMatch'~true_'context'~null_'kind'~77_'order'~0_'orderLowestFirst'~false_'query'~'"
  41. b2so=b1.replace(" ","%20")
  42. b3so="'_'filters'~!*)"
  43. urlso=urlso+b2so+b3so
  44. time.sleep(2)
  45. driver.get(urlso)
  46.  
  47. refsso=driver.page_source
  48.  
  49. pagesoup=soup(refs,"html.parser")
  50.  
  51.  
  52. countso=0
  53. #========================================================================================================================
  54. print("\n")
  55. print("\n")
  56.  
  57. print("============================================================================================")
  58. print("IEEE  ("+ str(countieee)+")")
  59. print("SCIENCE DIRECT   "+ str(countsd))
  60. print("SCIENCE OPEN    "+ str(countso))
  61.  
  62.  
  63.  
  64.  
  65. print("\n")
  66. print("============================================================================================")
Add Comment
Please, Sign In to add comment