Remove legacy Python2 code (#150)

This commit is contained in:
Diego Heras 2020-11-28 20:34:41 +01:00 committed by GitHub
parent a02a35e4ec
commit 4f396c0c42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 36 additions and 83 deletions

View File

@ -1,15 +1,9 @@
#VERSION: 1.11
#VERSION: 1.12
# AUTHORS: nindogo
# CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es)
try:
# python3
from html.parser import HTMLParser
except ImportError:
# python2
from HTMLParser import HTMLParser
from html.parser import HTMLParser
# qBt
from novaprinter import prettyPrinter
from helpers import retrieve_url

View File

@ -1,4 +1,4 @@
#VERSION: 3.4
#VERSION: 3.5
# AUTHORS: Diego de las Heras (ngosang@hotmail.es)
# CONTRIBUTORS: ukharley
# hannsen (github.com/hannsen)
@ -6,18 +6,10 @@
import json
import os
import xml.etree.ElementTree
try:
# python3
from urllib.parse import urlencode, unquote
from urllib import request as urllib_request
from http.cookiejar import CookieJar
except ImportError:
# python2
from urllib import urlencode, unquote
import urllib2 as urllib_request
from cookielib import CookieJar
from urllib.parse import urlencode, unquote
from urllib import request as urllib_request
from http.cookiejar import CookieJar
# qBt
from novaprinter import prettyPrinter
from helpers import download_file

View File

@ -1,4 +1,4 @@
#VERSION: 2.2
#VERSION: 2.3
#AUTHORS: Vikas Yadav (https://github.com/v1k45 | http://v1k45.com)
#CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es)
@ -27,14 +27,8 @@
# POSSIBILITY OF SUCH DAMAGE.
import re
try:
# python3
from html.parser import HTMLParser
except ImportError:
# python2
from HTMLParser import HTMLParser
from html.parser import HTMLParser
# qBt
from helpers import retrieve_url
from novaprinter import prettyPrinter

View File

@ -1,4 +1,4 @@
#VERSION: 2.4
#VERSION: 2.5
# AUTHORS: Christophe Dumez (chris@qbittorrent.org)
# Douman (custparasite@gmx.se)

View File

@ -1,18 +1,11 @@
#VERSION: 4.5
#VERSION: 4.6
# AUTHORS: Lima66
# CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es)
import re
try:
# python3
from html.parser import HTMLParser
from urllib.parse import quote
except ImportError:
# python2
from HTMLParser import HTMLParser
from urllib import quote
from html.parser import HTMLParser
from urllib.parse import quote
# qBt
from novaprinter import prettyPrinter
from helpers import retrieve_url

View File

@ -1,4 +1,4 @@
#VERSION: 2.20
#VERSION: 2.21
# AUTHORS: Fabien Devaux (fab@gnux.info)
# CONTRIBUTORS: Christophe Dumez (chris@qbittorrent.org)
# Arthur (custparasite@gmx.se)
@ -28,14 +28,8 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
try:
# python3
from html.parser import HTMLParser
except ImportError:
# python2
from HTMLParser import HTMLParser
from html.parser import HTMLParser
# qBt
from novaprinter import prettyPrinter
from helpers import download_file, retrieve_url

View File

@ -1,4 +1,4 @@
#VERSION: 2.13
#VERSION: 2.14
# AUTHORS: b0nk
# CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es)
@ -28,14 +28,8 @@
import json
import time
try:
# python3
from urllib.parse import urlencode, unquote
except ImportError:
# python2
from urllib import urlencode, unquote
from urllib.parse import urlencode, unquote
# qBt
from novaprinter import prettyPrinter
from helpers import retrieve_url

View File

@ -1,12 +1,13 @@
#VERSION: 2.1
#VERSION: 2.2
# AUTHORS: Douman (custparasite@gmx.se)
# CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es)
from novaprinter import prettyPrinter
from helpers import retrieve_url, download_file
from re import compile as re_compile
from html.parser import HTMLParser
from novaprinter import prettyPrinter
from helpers import retrieve_url, download_file
class torlock(object):
url = "https://www.torlock.com"

View File

@ -1,4 +1,4 @@
#VERSION: 1.0
#VERSION: 1.1
# AUTHORS: Dessalines
# Redistribution and use in source and binary forms, with or without
@ -26,14 +26,8 @@
# POSSIBILITY OF SUCH DAMAGE.
import json
try:
# python3
from urllib.parse import urlencode
except ImportError:
# python2
from urllib import urlencode
from urllib.parse import urlencode
# qBt
from novaprinter import prettyPrinter
from helpers import retrieve_url

View File

@ -1,10 +1,10 @@
eztv: 1.11
jackett: 3.4
leetx: 2.2
legittorrents: 2.4
limetorrents: 4.5
piratebay: 2.20
rarbg: 2.13
torlock: 2.1
torrentscsv: 1.0
zooqle: 1.13
eztv: 1.12
jackett: 3.5
leetx: 2.3
legittorrents: 2.5
limetorrents: 4.6
piratebay: 2.21
rarbg: 2.14
torlock: 2.2
torrentscsv: 1.1
zooqle: 1.14

View File

@ -1,4 +1,4 @@
#VERSION: 1.13
#VERSION: 1.14
# AUTHORS: Kanishk Singh (https://github.com/ArionMiles/)
# CONTRIBUTORS: affaff (https://github.com/affaff)
@ -24,18 +24,15 @@
from xml.dom import minidom
from novaprinter import prettyPrinter
from io import StringIO
import gzip
from urllib.request import urlopen, Request, URLError
from novaprinter import prettyPrinter
user_agent = 'Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0'
headers = {'User-Agent': user_agent}
try:
from urllib2 import urlopen, Request, URLError
except ImportError:
from urllib.request import urlopen, Request, URLError
def retrieve_url_nodecode(url):
""" Return the content of the url page as a string """