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
const puppeteer = require('puppeteer'); | |
const fs = require("fs"); | |
let crawlPage = async (url, pageID) => { | |
const browser = await puppeteer.launch({headless:true, }); | |
const page = await browser.newPage(); | |
// prevent | |
// TimeoutError: Navigation timeout of 30000 ms exceeded | |
await page.setDefaultNavigationTimeout(0); |
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
package main | |
import ( | |
"time" | |
log "github.com/Sirupsen/logrus" | |
"github.com/fzzy/radix/redis" | |
"github.com/fzzy/radix/extra/pool" | |
"github.com/jinzhu/gorm" |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
func main() { | |
// one way is to have a value of the type you want already | |
a := 1 |
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
package main | |
import ( | |
"fmt" | |
"time" | |
"reflect" | |
) | |
func TestReflect(a int64) { | |
var i int64 |