Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

PHP curl

I am trying to scrape item numbers (eg. 33FR410) from this page https://www.tavor-trade.com/%D7%A7%D7%98...%95%D7%A8/

But I can't find them anywhere in the source HTML or HAR file
Completely puzzled 😧

Any help is appreciated
(Jan 15, 2020 12:07 PM)redmoon90211 Wrote:  I am trying to scrape item numbers (eg. 33FR410) from this page https://www.tavor-trade.com/%D7%A7%D7%98...%95%D7%A8/

But I can't find them anywhere in the source HTML or HAR file
Completely puzzled  😧

Any help is appreciated
You can't find them because they're loaded by a XHR request, which is not sent if you view the source or fetch it via cURL.

Je t'aime
[Image: fpZ5a5g.png]

(Apr 22, 2022 04:39 PM)-Scrub Wrote:  Jokes on you, I'm not smart enough to know what he's talking about.
(Jan 15, 2020 12:17 PM)Nachfolger Wrote:  You can't find them because they're loaded by a XHR request, which is not sent if you view the source or fetch it via cURL.

I can't find them in the HAR file saved from Chrome browser either
(Jan 15, 2020 12:19 PM)redmoon90211 Wrote:  I can't find them in the HAR file saved from Chrome browser either
They are all there, it's the XHR request made to "https://shop4.wizsoft.com/VSHOP/WSHOP.wzx". Block the request URI and the items will no longer load.

[Image: vXJUwWT.png]

Je t'aime
[Image: fpZ5a5g.png]

(Apr 22, 2022 04:39 PM)-Scrub Wrote:  Jokes on you, I'm not smart enough to know what he's talking about.
(Jan 15, 2020 12:32 PM)Nachfolger Wrote:  They are all there, it's the XHR request made to "https://shop4.wizsoft.com/VSHOP/WSHOP.wzx". Block the request URI and the items will no longer load.

[Image: vXJUwWT.png]

Thanks ! Still can't find them tho, may be encrypted or in base64 format, I will look into that
(Jan 15, 2020 12:57 PM)redmoon90211 Wrote:  Thanks ! Still can't find them tho, may be encrypted or in base64 format, I will look into that

See if there’s any JavaScript that decodes it.

AFAIK you can see every JS call made in chrome profiles
(Jan 15, 2020 12:57 PM)redmoon90211 Wrote:  Thanks ! Still can't find them tho, may be encrypted or in base64 format, I will look into that
Based on what Charger just said, I decided to dig further. Here you go:

Code
eval("Tmp = " + unescape(response.responseText));
It produces a JSON object.

Aka:
Code
eval("Tmp = " + unescape(`%u007b%u0020%u0022%u0053%u0074%u0061%u0074%u0075%u0073%u0022%u003a%u0022%u004f%u004b%u0022%u002c%u0022%u004e%u006f%u0074%u0065%u0073%u0054%u0061%u0062%u0022%u003a%u005b%u005b%u0022%u0031%u0022%u002c%u0022%u05de%u05d5%u05ea%u05d2%u0022%u002c%u0022%u0030%u0022%u005d%u005d%u002c%u0022%u0043%u006f%u006c%u0075%u006d%u006e%u0073%u0022%u003a%u005b%u0022%u004e%u006f%u0074%u0065%u0049%u0044%u0022%u002c%u0022%u004e%u006f%u0074%u0065%u004e%u0061%u006d%u0065%u0022%u002c%u0022%u0049%u0073%u004e%u0075%u006d%u0065%u0072%u0069%u0063%u0022%u005d%u0020%u007d`))

Results in:
Quote:"{"Status":"OK","NotesTab":[["1","מותג","0"]],"Columns":["NoteID","NoteName","IsNumeric"]}"


Je t'aime
[Image: fpZ5a5g.png]

(Apr 22, 2022 04:39 PM)-Scrub Wrote:  Jokes on you, I'm not smart enough to know what he's talking about.
(Jan 15, 2020 03:20 PM)Nachfolger Wrote:  Based on what Charger just said, I decided to dig further. Here you go:

Code
eval("Tmp = " + unescape(response.responseText));
It produces a JSON object.

Aka:
Code
eval("Tmp = " + unescape(`%u007b%u0020%u0022%u0053%u0074%u0061%u0074%u0075%u0073%u0022%u003a%u0022%u004f%u004b%u0022%u002c%u0022%u004e%u006f%u0074%u0065%u0073%u0054%u0061%u0062%u0022%u003a%u005b%u005b%u0022%u0031%u0022%u002c%u0022%u05de%u05d5%u05ea%u05d2%u0022%u002c%u0022%u0030%u0022%u005d%u005d%u002c%u0022%u0043%u006f%u006c%u0075%u006d%u006e%u0073%u0022%u003a%u005b%u0022%u004e%u006f%u0074%u0065%u0049%u0044%u0022%u002c%u0022%u004e%u006f%u0074%u0065%u004e%u0061%u006d%u0065%u0022%u002c%u0022%u0049%u0073%u004e%u0075%u006d%u0065%u0072%u0069%u0063%u0022%u005d%u0020%u007d`))

Results in:

I’m a genius I know
(Jan 15, 2020 03:43 PM)Charger Wrote:  I’m a genius I know
Compared to a aboriginal? Yes. Compared to me? No.

Je t'aime
[Image: fpZ5a5g.png]

(Apr 22, 2022 04:39 PM)-Scrub Wrote:  Jokes on you, I'm not smart enough to know what he's talking about.
Thank you all ! Especially Nachfolger, you rock !
When it comes to scrapping, I'd always use python.
See: https://www.crummy.com/software/BeautifulSoup/bs4/doc/
[Image: vibesignature.gif]


“Whatever Your Mind Can Conceive and Believe, It Can Achieve.” – Napoleon Hill
(Jan 16, 2020 07:24 AM)newQuery Wrote:  When it comes to scrapping, I'd always use python.
See: https://www.crummy.com/software/BeautifulSoup/bs4/doc/

simple_html_dom is available for PHP which is almost the same as BS.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by barimoAug 6, 2021 01:01 AM 4 213 Aug 6, 2021 01:01 AM
Last Post: barimo
[PHP] by Programmer00Jan 30, 2020 05:57 AM 1 152 Jan 30, 2020 05:57 AM
Last Post: Charger
[PHP] by linhtinhOct 23, 2019 02:51 PM 5 270 Oct 23, 2019 02:51 PM
Last Post: Charger