Skip to content

Instantly share code, notes, and snippets.

View mrron313's full-sized avatar
🏠
Cool!

Arif Ul Islam mrron313

🏠
Cool!
View GitHub Profile
response = requests.get(link, headers=HEADER)
soup = BeautifulSoup(response.text, "html.parser")
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"
package main
import (
"fmt"
"time"
"crypto/sha256"
"encoding/hex"
"strconv"
)
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import ReadMoreLess from 'read-more-less-toggle';
ReactDOM.render(<ReadMoreLess len="30" content="If you are here, I assume that you are tired of searching email verification through Django And React"
btnColor="white" btnBackgroundColor="black" />, document.getElementById('root'));
import React, { Component } from 'react'
import '../App.css';
export default class ReadMoreLess extends Component {
constructor() {
super();
this.state = {
showMore: false
}
var path = require('path');
module.exports = {
mode: 'production',
entry: './src/ReadMoreLess.js',
output: {
path: path.resolve('lib'),
filename: 'ReadMoreLess.js',
libraryTarget: 'commonjs2'
},
@mrron313
mrron313 / package.json
Created February 6, 2020 19:16
npm package
{
"name": "read-more-less-toggle",
"version": "1.10.0",
"description": "a simple react package to provide read more or less feature on paragraph",
"main": "./lib/ReadMoreLess.js",
"scripts": {
"start": "webpack --watch",
"build": "webpack"
},
"repository": {
const NewsCard = (props) => {
const singleNews = props.singleNews
return(
<div className="col-md-12 news-card">
<div className="card">
<div className="card-body d-flex flex-row">
<div className="float-right ml-3 w-75">
<h5 className="card-title"> {singleNews.title} </h5>
<p> {singleNews.content} </p>
class NewsList extends Component {
componentDidMount() {
this.refs.iScroll.addEventListener("scroll", this.handleOnScroll);
}
componentWillUnmount() {
this.refs.iScroll.removeEventListener("scroll", this.handleOnScroll);
}
handleOnScroll = () => {
<Query query={NEWS_FETCH} variables={{ country: country, after: "" }}>
{({ data, loading, fetchMore }) => {
const allNews = data ? data.allNews : []
const endCursor = data ? data.allNews.pageInfo.endCursor : ""
if(data)
if (allNews.edges.length == 0) return (<p>No News Found</p>)
return (