Skip to content

Instantly share code, notes, and snippets.

View raphaelsoul's full-sized avatar
㊗️
Question: why it works? why it not works? why it works after I restart?

Dechen Zhuang raphaelsoul

㊗️
Question: why it works? why it not works? why it works after I restart?
  • China
View GitHub Profile
@raphaelsoul
raphaelsoul / App.tsx
Created November 27, 2020 02:41
nested react router
import React from "react"
import {BrowserRouter, StaticRouter, Switch, Route, Link, Redirect} from "react-router-dom";
import Hello from "./Hello"
import World from "./World"
const isSSR = typeof window === "undefined"
const Router = isSSR ? StaticRouter : BrowserRouter
export default ({url}) => {
@raphaelsoul
raphaelsoul / qqlogin.js
Created February 4, 2021 14:25
QQMusicLogin
const login = async () => {
const browser = await puppeteer.launch({
headless: false,
devtools: true,
});
try {
const page = await browser.newPage();
await page.goto('https://y.qq.com', {
waitUntil: 'networkidle0'
});
Coverage Badge