Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

154
Vistas
Support with scrapy. get data from a double Postback

I am looking for help with a specific problem to get data from a postback table. I need to access a table that is loaded after pressing a button with a JavaScript PostbackWithOption. I think I am using the incorrect request because the table is not loading. I notice that the Postback is nested in another postback and should be the reason I cannot get to the table. Any advice is well received

The table is under the "Transfers" window in this link https://www83.hattrick.org/en-us/Club/Players/Player.aspx?playerId=469061287

This is the code I am using now:

def transf_tab(self,response):
open_in_browser(response)
#This is the code in the webpage javascript: WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ctl00$CPContent$CPMain$btnViewTransferHistory", "", true, "", "", false, true))

transfToken = response.xpath('//*[@id="__VIEWSTATE"]/@value').extract_first()
target ="ctl00$ctl00$CPContent$CPMain$btnViewTransferHistory"
# viewstategen = "0C55417A"
data = {'__EVENTTARGET': target,'__VIEWSTATE': transfToken},
return FormRequest(url=response.url,
                 method= 'POST',
                 formdata=data,
                 dont_filter= True,
                 callback=self.parse_player)

def parse_player(self, response):
    open_in_browser(response)
    trsf_item = HtsellsItem()

I have been able to scrap different webs using postback, but this time, after running the FormRequest, the table is not loaded, and there is some "new information" and some other information missing too

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda