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
import re | |
import requests | |
import time | |
import random | |
import string | |
from pyquery import PyQuery as pq | |
def decode_service_code(_svc : str, _r : str) -> str: | |
_r_key = 'yL/M=zNa0bcPQdReSfTgUhViWjXkYIZmnpo+qArOBs1Ct2D3uE4Fv5G6wHl78xJ9K' | |
_r = re.sub('[^A-Za-z0-9+/=]', '', _r) |
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
import time | |
import re | |
import requests | |
import math | |
from pyquery import PyQuery as pq | |
sess = requests.Session() | |
sess.headers.update({ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36'}) | |
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
def vote(gall_id: str, no: str, mode: str, proxy: str = '') -> str: | |
result = '' | |
s = requests.session() | |
s.headers.update({ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36' }) | |
if proxy: | |
s.proxies = {'http': 'http://' + proxy } | |
r1 = s.get('http://gall.dcinside.com/board/view/?id=' + gall_id, timeout=5) | |
#r1 = s.get('http://gall.dcinside.com/board/view/?id=' + gall_id + '&no=' + no, timeout=5) | |
s.headers.update({ | |
'Host': 'gall.dcinside.com', |