0

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

HTML Code

Gallaecio
  • 3,620
  • 2
  • 25
  • 64
Tim
  • 191
  • 2
  • 28

1 Answers1

1

Welcome here (: No need to overcomplicate things.

All you need is GET request to http://www.starcitygames.com/buylist/search?search-type=name&name=game Well... of course you can vary params. But anyway you'll get all you want right in json format by this link.

It looks like even login isn't needed in fact.

Good luck.

Michael Savchenko
  • 1,445
  • 1
  • 9
  • 13