Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zooqle support added #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
temp.py
__pycache__/
33 changes: 17 additions & 16 deletions kickass.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,29 @@
import pyperclip
import requests


def kickass_search(query, doDownload):
base_url="https://kickass.unblockit.top/search.php?q="
url=base_url+query+'/'
base_url = "https://kickass.unblockit.top/search.php?q="
url = base_url + query + '/'
print("Searching......")
source=requests.get(url).text
soup=bs(source,'lxml')
name=soup.find_all('a', class_="cellMainLink")
results=[]
i=1
source = requests.get(url).text
soup = bs(source, 'lxml')
name = soup.find_all('a', class_="cellMainLink")
results = []
i = 1
for r in name:
print(i,r.text)
i=i+1
print(i, r.text)
i = i + 1

if doDownload == True:
if doDownload:
print("Enter the Serial Number of the search item you like to download: ")
choice=int(input())
print ("Fetching data.....")
magnet=soup.find_all('a', title="Torrent magnet link")
a=[]
choice = int(input())
print("Fetching data.....")
magnet = soup.find_all('a', title="Torrent magnet link")
a = []
for m in magnet:
a.append(m['href'])
magnet_link=(a[choice-1])
magnet_link = (a[choice - 1])
print("Magnet Link of your selected choice has been fetched.")
pyperclip.copy(magnet_link)
print ("Your magnet link is now in your clipboard.")
print("Your magnet link is now in your clipboard.")
30 changes: 16 additions & 14 deletions piratebay.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@
import pyperclip
import requests


def piratebay_search(query, doDownload):
url='https://pirateproxy.gdn/search/'+query+'/0/99/0'
url = 'https://pirateproxy.gdn/search/' + query + '/0/99/0'
print("Searching......")
source=requests.get(url).text
soup=bs(source,'lxml')
results=soup.find_all('div',class_='detName')
i=1
source = requests.get(url).text
soup = bs(source, 'lxml')
results = soup.find_all('div', class_='detName')
i = 1
for r in results:
print(i,r.text)
i=i+1
print(i, r.text)
i = i + 1

if doDownload == True:
if doDownload:
Copy link
Author

@nitish771 nitish771 Nov 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True == True is True

print("Enter the Serial Number of the search item you like to download: ")
choice=int(input())
print ("Fetching data.....")
magnet_results=soup.find_all('a',title='Download this torrent using magnet')
a=[]
choice = int(input())
print("Fetching data.....")
magnet_results = soup.find_all(
'a', title='Download this torrent using magnet')
a = []
for m in magnet_results:
a.append(m['href'])
magnet_link=(a[choice-1])
magnet_link = (a[choice - 1])
print("Magnet Link of your selected choice has been fetched.")
pyperclip.copy(magnet_link)
print ("Your magnet link is now in your clipboard.")
print("Your magnet link is now in your clipboard.")
16 changes: 8 additions & 8 deletions search.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
import piratebay
import spell

query=input("Enter your query\n")
query=str(spell.Check(query))
print("Searching for :",query)
query = input("Enter your query\n")
query = str(spell.Check(query))
print("Searching for :", query)

n=int(input("Enter your preferred Torrent Search Engine:\n 1: ThePirateBay\n 2: Kickass\n 3: Zooqle\n 4: All\n"))
n = int(input("Enter your preferred Torrent Search Engine:\n 1: ThePirateBay\n 2: Kickass\n 3: Zooqle\n 4: All\n"))

if n==1:
if n == 1:
piratebay.piratebay_search(query, True)
elif n==2:
elif n == 2:
kickass.kickass_search(query, True)
elif n==3:
elif n == 3:
zooqle.zooqle_search(query, True)
elif n == 4:
print("Searching ThePirateBay")
Expand All @@ -26,7 +26,7 @@
print("Searching Kickass")
print("-----------------------")
kickass.kickass_search(query, False)

print("Searching Zooqle")
print("-----------------------")
zooqle.zooqle_search(query, False)
Expand Down
61 changes: 33 additions & 28 deletions zooqle.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
import json
from bs4 import BeautifulSoup as bs
import requests
import urllib.parse
import pyperclip
#import colored
#from colored import stylize
import re
import requests
# import json
# import urllib.parse
# import colored
# from colored import stylize
# import re


def zooqle_search(query, doDownload):
url="https://zooqle.unblockit.top/search?q="+query
print("Searching......")
source=requests.get(url).text
soup=bs(source,'lxml')
magnet_results=soup.find_all('a',title='Magnet link',href=True)
# print(magnet_results)
i=1
for a in soup.find_all('a',class_=' small', href=True):
len(a)
print (i," :", a['href'][1:-11])
print()
i+=1
url = "https://zooqle.unblockit.top/search?q=" + query
print("Searching......\n")
source = requests.get(url).text
soup = bs(source, 'lxml')
table_entries = soup.find_all('tr')
magnet_links = []

if doDownload == True:
index=int(input("Select one from the list below: \n"))
m=[]
for links in magnet_results:
m.append(links['href'])
magnet_link=m[index-1]
# print(magnet_link)
pyperclip.copy(magnet_link)
print("Magnet link of the selected movie is copied to clipboard!")
ind = 1

for i in table_entries:
if i.contents[1].text is not '':
print(ind, i.contents[1].text)
print()
ind += 1
try:
magnet_links.append(i.contents[2].ul.contents[1].a['href'])
except:
pass



if doDownload:
index = int(input("Select one from the list below: \n"))
print()

magnet_link = magnet_links[index - 1]
# print(magnet_link)
pyperclip.copy(magnet_link)
print("Magnet link of the selected movie is copied to clipboard!")

#zooqle_search(query)