clip-path: polygon(0 50%, 80% 50%, 80% 100%, 0 100%);
const cheerio = require('cheerio'); // npm install cheerio
const request = require('request'); // npm install request
const URL = 'https://www.instagram.com/p/Bq8MmN2hi9B/?hl=en'; // Video URL
request(URL, function (error, response, body) {
/*
...
Error Handling Here
...
*/
const $ = cheerio.load(body);
const videoTag = $('meta[property="og:video"]').attr('content'); // through meta tag
/*
Through video tag
Wait until document has been completely loaded
then: const videoTag = $('.tWeCl').attr('src');
*/
console.log(videoTag); // console output: https://instagram.fhen1-1.fna.fbcdn.net/vp/c59dc1712ed9a3386fecae951422e602/5C0B1BF2/t50.2886-16/47059203_507364433101104_5625153989382242304_n.mp4
});
<div class="_5wCQW">
<video
class="tWeCl"
playsinline=""
poster="https://instagram.fhen1-1.fna.fbcdn.net/vp/a976306a61cf8e479067e8ce96af5c42/5C0A0D28/t51.2885-15/e35/46093420_372126340028280_6102722465585727755_n.jpg"
preload="none"
src="https://instagram.fhen1-1.fna.fbcdn.net/vp/018d274540902bafb43ee254174faafc/5C09F710/t50.2886-16/47786125_419033321967458_5420819962497335296_n.mp4"
type="video/mp4">
</video>
<img
class="_8jZFn"
src="https://instagram.fhen1-1.fna.fbcdn.net/vp/a976306a61cf8e479067e8ce96af5c42/5C0A0D28/t51.2885-15/e35/46093420_372126340028280_6102722465585727755_n.jpg"
alt="">
</div>
const miniImages = document.querySelectorAll('.mini_img');
document.querySelector('.images').onclick = function(event) { // event handler for wrapper
if( event.target.classList.contains('mini_img') ) { // check if user click image element
miniImages.forEach( el => el.classList.remove('active')); // remove from all images class "active"
event.target.classList.add('active'); // add class "active" to clicked image
}
}
[
{
"title": "Some title",
"id": 1,
"isShown": false,
"order": 1
},
{
"title": "Some another title",
"id": 2,
"isShown": true,
"order": 2
}
]
[
{
"title": "Some title",
"id": 1,
"isShown": false,
},
{
"title": "Some another title",
"id": 2,
"isShown": true,
}
]
window.console.log(response.data);
const data = response.data['serial-metadata-response']['entry'][0]['citeScoreYearInfoList']['citeScoreYearInfo'];
window.console.log(data);
/*
citeScoreYearInfo: Array(4)
0: {@_fa: "true", @year: "2018", @status: "In-Progress", citeScoreInformationList: Array(1)}
1: {@_fa: "true", @year: "2017", @status: "Complete", citeScoreInformationList: Array(1)}
2: {@_fa: "true", @year: "2016", @status: "Complete", citeScoreInformationList: Array(1)}
3: {@_fa: "true", @year: "2015", @status: "Complete", citeScoreInformationList: Array(1)}
length: 4
__proto__: Array(0)
*/
const sortedData = data.filter( el => el['@status'] === 'Complete' )
// const sortedData = data.filter( el => el['@status'].toLowerCase() === 'complete' ) // better for me
window.console.log(sortedData); // All items with status "Complete"
/*
Array(3)
0: {@_fa: "true", @year: "2017", @status: "Complete", citeScoreInformationList: Array(1)}
1: {@_fa: "true", @year: "2016", @status: "Complete", citeScoreInformationList: Array(1)}
2: {@_fa: "true", @year: "2015", @status: "Complete", citeScoreInformationList: Array(1)}
length: 3
__proto__: Array(0)
*/
window.console.log(sortedData[0]); // First item with status "Complete"
jsonObject = new JSONObject(contents.trim());
Iterator<String> keys = jsonObject.keys();
while(keys.hasNext()) {
String key = keys.next();
if (jObject.get(key) instanceof JSONObject) {
}
}
const url = 'https://api.elsevier.com/content/serial/title?issn=2409-4943&field=SNIP,SJR,citeScoreYearInfo&view=STANDARD';
axios({
method: 'get',
url: url,
headers: {
'Access-Control-Allow-Origin': '*',
'X-ELS-APIKey': 'eacd8051907dafebe2e602fa7c8a0755',
}
})
.then( response => {
window.console.log(response.data);
window.console.log('***********************')
window.console.log(response.data['serial-metadata-response']['entry'][0]);
})
.catch( error => {
window.console.log(error);
window.console.log(error.response);
});
const url = 'https://api.elsevier.com/content/serial/title';
....
window.console.log(response.data['serial-metadata-response']['entry'][0]['dc:title']);
Остальные по аналогии делаются.