Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6095431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:48:40+00:00 2026-05-23T12:48:40+00:00

I am new to jython and scrapy, but I am impressed by the capabilities

  • 0

I am new to jython and scrapy, but I am impressed by the capabilities that is has. My question is, what is the best way to extract data when the XPaths are the same?

For example:

<tr>
  <td>
    <a href="/user/Bob">Bob Job</a>
  </td>
  <td>hi</td>
  <td>280.0</td>
</tr>

I need to scrape the information from all 3 td fields. I use firebug to extract the XPath which displays my XPath as

/html/body/table[2]/tbody/tr/td[2]/div/table/tbody/tr[2]/td[3]

what is the best way to extract data when the XPaths are the same? I may only need data from td[1] and td[3].

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:48:40+00:00Added an answer on May 23, 2026 at 12:48 pm

    You will have to identify a criteria to extract the values and put them in respective item fields. e.g.

    link     = hxs.select('//td/a/href').extract()[0]
    linktext = hxs.select('//td/a/text()').extract()[0]
    number   = hxs.select('//td').re('\d+\.\d+')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New question, but really close to need to refresh page in jquery mobile .
I'm new to django and jython. So, I have a very basic question. Is
New to python, competent in a few languages, but can't see a 'snazzy' way
how do I translate this code into jython? ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(file
New to Rails, and following a tutorial that starts by creating the classic blog
New to Chrome programming, but am more or less familiar with Javascript. Goal: A
New to Mongo, taking on the analytics quest and have a schema question. I'm
I'm new to Jython/Python world. I'm trying to install the multiprocessing package in Jython.
New to MonoTouch and MonoTouch.Dialog, but I'm sure it's possible to create a tab
New to objective-c, -(void) myfunction : (int) d It means that returning 'void' and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.