Skip to content

Commit

Permalink
^q^
Browse files Browse the repository at this point in the history
  • Loading branch information
KurtBestor committed Jan 2, 2020
1 parent 3d8e45e commit 57b5376
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions gelbooru_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ def get_tags(url):
class Downloader_gelbooru(Downloader):
type = 'gelbooru'
URLS = ['gelbooru.com']
MAX_CORE = 32
_id = None

def init(self):
#self.user_agent = downloader.hdr['User-Agent']
self.url = self.url.replace('gelbooru_', '')
if 'gelbooru.com' in self.url.lower():
self.url = self.url.replace('http://', 'https://')
Expand Down Expand Up @@ -98,9 +97,9 @@ def get_imgs(url, title=None, customWidget=None):
raise NotImplementedError('Not Implemented')

if 'page=dapi' not in url.lower():
tags = get_tags(url).replace(' ', '+')
print tags
tags = urllib.quote(tags, safe='/+')
tags = get_tags(url)
tags = urllib.quote(tags, safe='/')
tags = tags.replace('%20', '+')
url = "https://gelbooru.com/index.php?page=dapi&s=post&q=index&tags={}&pid={}&limit={}".format(tags, 0, LIMIT)

if customWidget is not None:
Expand Down
Binary file modified imgs/how_to_download.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 57b5376

Please sign in to comment.