Skip to content

Instantly share code, notes, and snippets.

View sometimesweremakemistakes's full-sized avatar
🏠
Working from home

it's been so long... sometimesweremakemistakes

🏠
Working from home
View GitHub Profile
@sometimesweremakemistakes
sometimesweremakemistakes / parser.js
Created May 11, 2020 18:38
XLand User Page Parser
const fetch = require('node-fetch')
const cheerio = require('cheerio')
const tableParser = require('cheerio-tableparser')
async function getInfoById(id = null) {
id = Number(id)
if(!id || isNaN(id) || id < 1) return {ok: false, response: "Не указан ID смешарика"}
let rawPage = await (await fetch(`https://playxland.ru/player/${id}`)).text()
@sometimesweremakemistakes
sometimesweremakemistakes / index.js
Created April 23, 2020 19:39
Simple stream URL getter for loveradio.ru
const http = require('http')
const streamPatterns = [
/stream.loveradio.ru:80\/[^">\s]+/g,
/stream2.n340.com:80\/[^">\s]+/g
]
http.get('http://www.loveradio.ru/player.htm', (response) => {
let data = ''

Keybase proof

I hereby claim:

  • I am drauiq on github.
  • I am drauiq (https://keybase.io/drauiq) on keybase.
  • I have a public key ASCen9mohAw2gUS3C-9E2-C0kW5i7ypH4FPw1hln0GJh8go

To claim this, I am signing this object: