|
|
|
|
|
|
|
|
import os |
|
|
import os |
|
|
from sites import gfy, imgur, tumblr, reddit |
|
|
|
|
|
|
|
|
from libs.scrapper.scrappersites import imgur, reddit, gfy, tumblr |
|
|
|
|
|
|
|
|
class scrapper(): |
|
|
class scrapper(): |
|
|
def __init__(self): |
|
|
def __init__(self): |
|
|
|
|
|
|
|
|
url2 = tumblr.tumblr().get(url) |
|
|
url2 = tumblr.tumblr().get(url) |
|
|
return url2 |
|
|
return url2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"""def main(choice): |
|
|
|
|
|
print("====== Menu ======") |
|
|
|
|
|
print("1: Download Subreddit") |
|
|
|
|
|
print("2: Download User") |
|
|
|
|
|
print("3: Download Your Front Page") |
|
|
|
|
|
print("9: Settings") |
|
|
|
|
|
while choice == 0: |
|
|
|
|
|
try: |
|
|
|
|
|
choice = int(input("Choice: ")) |
|
|
|
|
|
if choice == 1: |
|
|
|
|
|
reddit().menu() |
|
|
|
|
|
elif choice == 2 or choice == 3: |
|
|
|
|
|
print("Feature in development") |
|
|
|
|
|
choice = 0 |
|
|
|
|
|
elif choice == 9: |
|
|
|
|
|
schoice = 0 |
|
|
|
|
|
print("") |
|
|
|
|
|
print("") |
|
|
|
|
|
print("====== Settings ======") |
|
|
|
|
|
print("1: Run redditsub in debug mode") |
|
|
|
|
|
print("2: Run eroshare in debug mode") |
|
|
|
|
|
print("3: Run imguralbum in debug mode") |
|
|
|
|
|
print("4: Run gfycatget in debug mode") |
|
|
|
|
|
print("5: Run Imgur().Get() in debug mode") |
|
|
|
|
|
print("9: Exit Program") |
|
|
|
|
|
schoice = int(input("Choice: ")) |
|
|
|
|
|
if schoice == 1: |
|
|
|
|
|
reddit().menu() |
|
|
|
|
|
elif schoice == 2: |
|
|
|
|
|
url = input("Url: ") |
|
|
|
|
|
eroshare().get(url,"Test") |
|
|
|
|
|
elif schoice == 3: |
|
|
|
|
|
id = input("ID: ") |
|
|
|
|
|
imgur().get_album(id,"Test") |
|
|
|
|
|
elif schoice == 4: |
|
|
|
|
|
url = input("Url: ") |
|
|
|
|
|
gfycat().get(url) |
|
|
|
|
|
elif schoice == 5: |
|
|
|
|
|
url = input("URL: ") |
|
|
|
|
|
imgur().get(url[::-1],"Test") |
|
|
|
|
|
elif schoice == 6: |
|
|
|
|
|
reddit().saved() |
|
|
|
|
|
elif schoice == 9: |
|
|
|
|
|
return True |
|
|
|
|
|
else: |
|
|
|
|
|
print("Can't even fucking select the right shit") |
|
|
|
|
|
else: |
|
|
|
|
|
print("Your choice doesn't exist") |
|
|
|
|
|
choice = 0 |
|
|
|
|
|
except ValueError: |
|
|
|
|
|
print("Use an interger number to choose from the menu") |
|
|
|
|
|
choice = 0 |
|
|
|
|
|
""" |
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
|
|
varsetup() |
|
|
|
|
|
#spreadsheetsetup() |
|
|
|
|
|
print("Setting up Directory") |
|
|
|
|
|
os.chdir('/home/roxie/Storage_1/Hello') |
|
|
|
|
|
print("") |
|
|
|
|
|
exitchoice = False |
|
|
|
|
|
while exitchoice is False: |
|
|
|
|
|
exitchoice = main(0) |
|
|
|