I am trying yo click the display button on a website with no success and I really had no idea how to do it but I came across something that might work, splash:mouse_press
. Will that work with scrapy-splash and if so how do I implement it?
import scrapy
from scrapy.spiders import Spider
from scrapy_splash import SplashRequest
from ..items import NameItem
class LoginSpider(scrapy.Spider):
name = "LoginSpider"
start_urls = ["http://www.starcitygames.com/buylist/"]
def parse(self, response):
return scrapy.FormRequest.from_response(
response,
formcss='#existing_users form',
formdata={'ex_usr_email': 'email@example.com', 'ex_usr_pass': 'password'},
callback=self.after_login
)
def after_login(self, response):
item = NameItem()
item["Name"] = response.css("div.bl-result-title::text").get()
return item