Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!