How to Find a Weidian Item ID in a Product Link
On a standard Weidian item URL, the digits after itemID= identify the listing. The ID is separate from the number in a spreadsheet site's page address.
Direct and nested URLs
In https://weidian.com/item.html?itemID=7756999526, the listing ID is 7756999526. The same item is referenced by the Pandabuy.org trousers page, where 480 is a local page number. Preserve the whole Weidian ID as text so spreadsheet software cannot round it or display it in scientific notation.
An agent may include the Weidian URL as a value in its own query string. A value starting with https%3A%2F%2F is percent encoded. Parse the outer URL first and extract the nested value. Then parse that nested URL and read its item parameter. Decoding the entire outer URL before identifying its parameters can turn a nested ampersand into an outer separator.
Check the result
- Verify the extracted hostname and that the address refers to an item.
- Check that you have one unambiguous numeric ID.
- Open the source and compare the title, seller and options where available.
- If the link is shortened or carries no identifiable source, follow the visible redirect on a trusted site or ask for the original listing URL. Guessing digits from the outer page risks pulling up another product.
You can use the extracted ID to compare two links. A matching ID identifies the same listing; the chosen size, price and availability still require separate checks.
Technical reference: MDN on URLSearchParams.
