-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how i create json file #1581
Comments
The code in your example is JavaScript. This library is for C++. Are you sure you have opened this issue in the correct GitHub repository? |
yes its javascript webscraping extention |
How is the question related to JSON for Modern C++? |
how can i create javascript object |
In order to asses your issue, we need the following information:
|
my issue is that i cant create json file |
Please add the details above. |
I think I understand what he means. I also want to save my json object to a json file for other programs to read. How can I save json object to file? |
@huuson235: As described in Serialization section, call More info on |
@javedabbas112 Do you need further information? |
console.log("Anycodes Scraper Loaded!");
var titles = document.querySelectorAll(".bf1808");
var titles_count = titles.length;
for (var index = 0; index < titles_count; index++) {
console.log(titles[index].textContent);
}
var coupons = document.querySelectorAll(".offer_list_item");
var coupons_count = coupons.length;
for (var index = 0; index < coupons_count; index++) {
var title = coupons[index].querySelector(".bf1808").textContent;
var type = coupons[index].querySelector(".cou_property").textContent.trim();
if(type=="Code"){
console.log("Coupon");
var coupon_id = document.querySelectorAll(".offer_list_item")[index].getAttribute("data-cid");
console.log("https://www.anycodes.com/coupon-detail-"+coupon_id+".html");
var url = "https://www.anycodes.com/coupon-detail-"+coupon_id+".html"
}else{
console.log("Deal");
}
// console.log(title + " : " + type);
}
The text was updated successfully, but these errors were encountered: