in Education by
i am a newbie to scraping and selenium. The page which i want to scrape uses a js script on a button to get to the next page. I found part of a code (Click a Button in Scrapy) on SO but i cant seem to make it work. from selenium import webdriver import scrapy class chSpider(scrapy.Spider): name = 'spidypy' allowed_domains = ['117.145.177.252'] start_urls = ['http://117.145.177.252/login.do?method=enterPdamccx'] def __init__(self): self.driver = webdriver.Firefox() def parse(self,response): self.driver.get('http://117.145.177.252/login.do?method=enterPdamccx') while True: try: next = self.driver.find_element_by_xpath('/html/body/form/div[3]/div/div/a') url = 'http://117.145.177.252/login.do?method=enterPdamccx' yield Request(url,callback=self.parse2) next.click() except: break self.driver.close() def parse2(self,response): print('you are here!') I recieve following error messages several times: selenium.common.exceptions.WebDriverException: Message: connection refused JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
That a has an onclick, so you would just do: driver.execute_script('doMccx()')

Related questions

0 votes
    Actually I'm a newbie to the parsing stuff with Python Beautifulsoup4. I was scraping this website. I need ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
0 votes
    Let's say I have the following html context, which I don't have access to its creation : What I' ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I'm doing some web scraping with Python and Beautiful Soup. I've encountered a problem where the results ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 22, 2022 in Education by JackTerrance
0 votes
    RAM-Scraping is a special kind of malware that looks (scrape) for sensitive data in the hard drive. (a) True ... Security questions and answers pdf, mcq on Cyber Security pdf,...
asked Nov 4, 2021 in Education by JackTerrance
0 votes
    I am building a basic RSS reader app that, which the 'story' is clicked, the information for it is displayed in a modal ... .log('Does Not Work!'); Or another way: - overscroll...
asked Jul 30, 2022 in Education by JackTerrance
0 votes
    I am attempting to solve a problem where if the elements in one array are squared, and all of the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    How can we convert all elements of form to a JavaScript object?...
asked Jan 11, 2021 by JackTerrance
0 votes
    Actually I am checking the excel values whether they are displayed on the web page Mouse hover menu. The menu includes titles and the ... ")); int submenuui = 0; for (int a=1;a...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I want to log in to instagram using selenium, but I can't seem to enter values into the fields. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 1, 2022 in Education by JackTerrance
0 votes
    I'm using beautifulsoup and selenium to scrape some data in python. Here is my code which I run ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I'm using beautifulsoup and selenium to scrape some data in python. Here is my code which I run ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I have written tests with Selenium2/WebDriver and want to test if HTTP Request returns an HTTP 403 Forbidden. ... Selenium WebDriver? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    How to open a new tab in the existing Firefox browser using Selenium WebDriver (a.k.a. Selenium 2)? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    In the HTML of a web app, there is the following code What is actually shown on the page is a string displaying ... . Any help? Thanks. Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
...