This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title>Verify Email</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style type="text/css"> | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import Cropper from "cropperjs"; | |
import '../../index.css'; | |
var cropper; | |
export default class App extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
imgSrc: null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// every & some operator | |
peoples = [ | |
{name: "arif", age: 25}, | |
{name: "ron", age: 24}, | |
{name: "ron", age: 23} | |
] | |
console.log(peoples.every( people => people.age > 24 )) // false | |
console.log(peoples.every( people => people.age > 18 )) // true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sum = (...numbers) => numbers.reduce( (sum, number) => sum + number, 0) | |
console.log(sum(1,2,3)) | |
const arr1 = [ "tamim", "sakib" ] | |
const arr2 = [ "messi", "ronaldo" ] | |
console.log([ 1, 2, ...arr1, ...arr2 ]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var values = { | |
val1: 12, | |
val2: 23 | |
} | |
const { val1, val2 } = values | |
console.log(val1, val2) | |
const companies = ["Google", "Facebook", "Uber"] | |
const [ name ] = companies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
videoPublished = soup.find(attrs={"class": "watch-time-text"}).text | |
videoCategory = soup.find(attrs={"class": "watch-info-tag-list"}) | |
likeButon = soup.find(attrs={"class": "like-button-renderer-like-button"}) | |
dislikeButon = soup.find(attrs={"class": "like-button-renderer-dislike-button"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
videoViews = soup.find(attrs={"class": "watch-view-count"}).text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thumbSoupMeta = soup.find("meta", property="og:image") | |
videoImage = thumbSoupMeta["content"] if thumbSoupMeta else "NotFound" | |
print(videoImage) # https://i.ytimg.com/vi/qZp5gf9xgnE/maxresdefault.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
titleSoupMeta = soup.find("meta", property="og:title") | |
videoTitle = titleSoupMeta["content"] if titleSoupMeta else "NotFound" | |
print(videoTitle) # I Will (feat. KXNG Crooked, Royce da 5'9" & Joell Ortiz) [Official Audio] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
HEADER = { | |
"User-Agent": 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36' | |
} | |
link = "https://www.youtube.com/watch?v=qZp5gf9xgnE" | |
response = requests.get(link, headers=HEADER) | |
soup = BeautifulSoup(response.text, "html.parser") |
NewerOlder