简体   繁体   中英

Node JS request and cheerio HTML-Page error

Hi everybody i'm trying to parse site on node js (with request and cheerio) so i'm need to get href from site, but i see href only in window of site But i didn't see href in html code of this page, i only found this some part code, so i can't parse, because request didn't see href. I hope that somebody gotta help me :)

It looks like the page requests the actual URL for the file download from the server when you first access it. If you go to the "Network" tab in chrome dev tools, you'll see the request being made and the associated response.

You should be able to make the request yourself:

https://www.apkmonk.com/down_file/?wwwpkg=com.ty.followers&key=3_com.ty.followers_2016-08-15.apk

And get the following response:

{
    "url": "http://apk.apkmonk.com/apkmonk/com.ty.followers_2016-08-15.apk?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=IFVYHACUO60QSGWW9L9Z%2F20180528%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180528T191013Z&X-Amz-Expires=2400&X-Amz-SignedHeaders=host&X-Amz-Signature=8d0f27e3fa4303d5852b6e90369cc8af85e6d9568636f3083b20cfd30485dfb7",
    "resp": "success"
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM