Skip to content

Instantly share code, notes, and snippets.

@tesths
tesths / msoWord_SplitPages.vbs
Last active May 17, 2021 00:55 — forked from wangye/msoWord_SplitPages.vbs
VBScript/VBS/VBA split single word document to multi-documents by pages
'
' Description: VBScript/VBS/VBA
' split single word document
' to multi-documents by pages
' Author: wangye <pcn88 at hotmail dot com>
' Website: http://wangye.org
' Copyright by author
'
Const PrevPage = 0
Const NextPage = 1
import io, sys, time, re, os
import winreg
import requests
import json
xpath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
def setProxy(enable,proxyIp,IgnoreIp):
try:
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, xpath, 0, winreg.KEY_WRITE)
@tesths
tesths / bilibili
Created June 29, 2019 08:00
bilibili
{"_id":"bilibili","startUrl":["https://www.bilibili.com/ranking/all/0/0/3"],"selectors":[{"id":"element","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"li.rank-item","multiple":true,"delay":"2000","clickElementSelector":".rank-tab li","clickType":"clickOnce","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueText"},{"id":"title","type":"SelectorLink","parentSelectors":["element"],"selector":"a.title","multiple":false,"delay":0},{"id":"play","type":"SelectorText","parentSelectors":["element"],"selector":".detail > span:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"comment","type":"SelectorText","parentSelectors":["element"],"selector":"span:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"source","type":"SelectorText","parentSelectors":["element"],"selector":"a span","multiple":false,"regex":"","delay":0},{"id":"grade","type":"SelectorText","parentSelectors":["element"],"selector":".pts div","multiple":false,"regex":"","delay":0},{"
@tesths
tesths / bash.sh
Created February 13, 2019 13:31
frp 配置文件
nohup ./frps -c ./frps.ini > frp.txt 2>&1 &
@tesths
tesths / sana.json
Created November 16, 2018 12:29
SanaChina961229 Web Scraper
{
"_id": "weibo",
"startUrl": [
"https://weibo.com/SanaChina961229?is_search=0&visible=0&is_all=1&is_tag=0&profile_ftype=1&page=[1-2]"
],
"selectors": [
{
"id": "real-content",
"type": "SelectorElementScroll",
"parentSelectors": [
@tesths
tesths / weibo.json
Created November 14, 2018 02:47
web scraper 爬虫
{
"_id": "weibo",
"startUrl": [
"https://weibo.com/SanaChina961229?is_search=0&visible=0&is_all=1&is_tag=0&profile_ftype=1&page=[501-588]"
],
"selectors": [
{
"id": "real-content",
"type": "SelectorElementScroll",
"parentSelectors": [
@tesths
tesths / gongzhonghao.json
Last active November 14, 2018 02:47
web scraper 公众号爬虫
{
"_id": "gongzhonghao",
"startUrl": [
"https:AAA"
],
"selectors": [
{
"id": "total",
"type": "SelectorElementScroll",
"parentSelectors": [
@tesths
tesths / story.rb
Created August 6, 2018 08:26
instagram story download
require 'httparty'
response = HTTParty.get('https://www.instagram.com/xx/', timeout: 60)
response = response.scan(/window._sharedData = (.*?);/)[0][0]
json = JSON.parse(response)
user_id = json['entry_data']['ProfilePage'][0]['graphql']['user']['id']
puts user_id
url = 'https://i.instagram.com/api/v1/feed/user/' + user_id + '/reel_media/'
require 'json'
require 'httparty'
require 'telegram/bot'
require 'byebug'
def request_ins
begin
puts "request start at " + Time.now.to_s
response = HTTParty.get('https://www.instagram.com/twicetagram/', timeout: 60)
@tesths
tesths / ins.rb
Last active April 3, 2018 04:06
A spide of instagram
require 'json'
require 'httparty'
require 'telegram/bot'
require 'byebug'
token = ''
bot = Telegram::Bot::Client.new(token)
def requestIns