mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
header
This commit is contained in:
parent
67a4025f83
commit
4bcce4f36f
@ -20,10 +20,6 @@ import json
|
|||||||
from fake_useragent import UserAgent
|
from fake_useragent import UserAgent
|
||||||
import random
|
import random
|
||||||
|
|
||||||
# user agent and header
|
|
||||||
ua = UserAgent()
|
|
||||||
header = {'User-Agent': str(ua.chrome)}
|
|
||||||
|
|
||||||
|
|
||||||
class GifAPIMainSection(StaticSection):
|
class GifAPIMainSection(StaticSection):
|
||||||
extra = ValidatedAttribute('extra', default=None)
|
extra = ValidatedAttribute('extra', default=None)
|
||||||
@ -93,6 +89,8 @@ def shutdown(bot):
|
|||||||
|
|
||||||
def getGif(bot, searchdict):
|
def getGif(bot, searchdict):
|
||||||
|
|
||||||
|
header = {'User-Agent': str(UserAgent().chrome)}
|
||||||
|
|
||||||
# list of defaults
|
# list of defaults
|
||||||
query_defaults = {
|
query_defaults = {
|
||||||
"query": None,
|
"query": None,
|
||||||
|
|||||||
@ -20,9 +20,6 @@ from pygit2 import clone_repository
|
|||||||
|
|
||||||
import spicemanip
|
import spicemanip
|
||||||
|
|
||||||
# user agent and header
|
|
||||||
ua = UserAgent()
|
|
||||||
header = {'User-Agent': str(ua.chrome)}
|
|
||||||
|
|
||||||
"""Variable References"""
|
"""Variable References"""
|
||||||
|
|
||||||
@ -160,6 +157,7 @@ def humanized_time(countdownseconds):
|
|||||||
|
|
||||||
|
|
||||||
def googlesearch(bot, searchterm, searchtype=None):
|
def googlesearch(bot, searchterm, searchtype=None):
|
||||||
|
header = {'User-Agent': str(UserAgent().chrome)}
|
||||||
data = searchterm.replace(' ', '+')
|
data = searchterm.replace(' ', '+')
|
||||||
lookfor = data.replace(':', '%3A')
|
lookfor = data.replace(':', '%3A')
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user