tags:

views:

266

answers:

2

Hello, I would like to know if it is possible,

To extract the userid from an ebay page and insert it into mysql as part of an insert statement? Otherwise what would be the best way to do this?

I have files to import, which contain hundred of ebay auction urls, and I must grab the seller id from each one. Is there an easier way to do this than what I am suggesting?

+3  A: 

You could use the eBay API for that. The URL for each page contains an item number, and that can be used to query eBay for the seller id.

eBay Hacks Item 109 gives some PHP example code to do what you need (and more).

Bill the Lizard
I was trying to avoid using the ebay API, as I do not want to have to write a separate program to do this before importing.
Joshxtothe4
Without the API you'd have to write a bit of code that downloads and parses the auction page. I'd say using the API will be as easy, if not easier. And you won't get into troube when eBay changes the page layout in some way.
_Lasar
I agree with Lasar. If an API is available, you want to avoid scraping the page.
Bill the Lizard
OK, thanks guys. Is there a sample of a function to do exactly what I want, i.e. obtain a seller id from an auction number? I am not a programmer as such and need this for a database thing.
Joshxtothe4
There's some example code in eBay Hacks. See my edited reply.
Bill the Lizard
A: 

Hello i am making website which will have all the categories and its products which are from eBay using eBay API's but i am not able to make the levels in magento,

I mean there are bunch of categories which i am getting from eBay while inserting those categories in Magento using magento API, i am not able to set the levele of the category

Like Antiques -- Antiques -- Antiquities -- The Americas --

  Above is the categories level of the eBay which i have to insert in magento but i am only able to insert till second level rest of the categories are getting added under second level, below is the flowchart of the category which i have inserted in magento.

          Antiques
                  Antiques
                  Antiquities
                  The Americas 

Can any one please explain why its happening, although my code is perfect. Please help me to short out the problem.

Thanks in Advance Yogisfunda