本文整理汇总了Python中requests.compat.urljoin函数的典型用法代码示例。如果您正苦于以下问题:Python urljoin函数的具体用法?Python urljoin怎么用?Python urljoin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了urljoin函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, 'HDSpace')
# Credentials
self.username = None
self.password = None
# URLs
self.url = 'https://hd-space.org'
self.urls = {
'login': urljoin(self.url, 'index.php?page=login'),
'search': urljoin(self.url, 'index.php'),
}
# Proper Strings
# Miscellaneous Options
# Torrent Stats
self.minseed = None
self.minleech = None
# Cache
self.cache = tvcache.TVCache(self, min_time=10) # only poll HDSpace every 10 minutes max
开发者ID:Eiber,项目名称:SickRage-Medusa,代码行数:26,代码来源:hdspace.py
示例2: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, "TransmitTheNet")
# Credentials
self.username = None
self.password = None
# Torrent Stats
self.minseed = None
self.minleech = None
self.freeleech = None
# URLs
self.url = 'https://transmithe.net/'
self.urls = {
'login': urljoin(self.url, '/login.php'),
'search': urljoin(self.url, '/torrents.php'),
}
# Proper Strings
# Cache
self.cache = tvcache.TVCache(self)
开发者ID:bitzorro,项目名称:SickRage,代码行数:25,代码来源:transmitthenet.py
示例3: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, 'TorrentDay')
# Credentials
self.username = None
self.password = None
# URLs
self.url = 'https://classic.torrentday.com'
self.urls = {
'login': urljoin(self.url, '/torrents/'),
'search': urljoin(self.url, '/V3/API/API.php'),
'download': urljoin(self.url, '/download.php/')
}
# Proper Strings
# Miscellaneous Options
self.freeleech = False
self.enable_cookies = True
self.cookies = ''
self.categories = {'Season': {'c14': 1}, 'Episode': {'c2': 1, 'c26': 1, 'c7': 1, 'c24': 1},
'RSS': {'c2': 1, 'c26': 1, 'c7': 1, 'c24': 1, 'c14': 1}}
# Torrent Stats
self.minseed = None
self.minleech = None
# Cache
self.cache = tvcache.TVCache(self, min_time=10) # Only poll IPTorrents every 10 minutes max
开发者ID:Eiber,项目名称:SickRage-Medusa,代码行数:33,代码来源:torrentday.py
示例4: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, "ThePirateBay")
# Credentials
self.public = True
# Torrent Stats
self.minseed = None
self.minleech = None
self.confirmed = True
# URLs
self.url = "https://thepiratebay.se"
self.urls = {
"rss": urljoin(self.url, "browse/200"),
"search": urljoin(self.url, "s/"), # Needs trailing /
}
self.custom_url = None
# Proper Strings
# Cache
self.cache = tvcache.TVCache(self, min_time=30) # only poll ThePirateBay every 30 minutes max
开发者ID:Comptezero,项目名称:SickRage,代码行数:25,代码来源:thepiratebay.py
示例5: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, 'MoreThanTV')
# Credentials
self.username = None
self.password = None
self._uid = None
self._hash = None
# URLs
self.url = 'https://www.morethan.tv/'
self.urls = {
'login': urljoin(self.url, 'login.php'),
'search': urljoin(self.url, 'torrents.php'),
}
# Proper Strings
self.proper_strings = ['PROPER', 'REPACK']
# Miscellaneous Options
# Torrent Stats
self.minseed = None
self.minleech = None
# Cache
self.cache = tvcache.TVCache(self)
开发者ID:Eiber,项目名称:SickRage-Medusa,代码行数:29,代码来源:morethantv.py
示例6: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, 'HoundDawgs')
# Credentials
self.username = None
self.password = None
# URLs
self.url = 'https://hounddawgs.org'
self.urls = {
'base_url': self.url,
'search': urljoin(self.url, 'torrents.php'),
'login': urljoin(self.url, 'login.php'),
}
# Proper Strings
# Miscellaneous Options
self.freeleech = None
self.ranked = None
# Torrent Stats
self.minseed = None
self.minleech = None
# Cache
self.cache = tvcache.TVCache(self)
开发者ID:Eiber,项目名称:SickRage-Medusa,代码行数:29,代码来源:hounddawgs.py
示例7: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, "Speedcd")
# Credentials
self.username = None
self.password = None
# Torrent Stats
self.minseed = None
self.minleech = None
self.freeleech = False
# URLs
self.url = 'https://speed.cd'
self.urls = {
'login': urljoin(self.url, 'take.login.php'),
'search': urljoin(self.url, 'browse.php'),
}
# Proper Strings
self.proper_strings = ['PROPER', 'REPACK']
# Cache
self.cache = tvcache.TVCache(self)
开发者ID:ratoaq2,项目名称:SickRage,代码行数:26,代码来源:speedcd.py
示例8: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, "FileList")
# Credentials
self.username = None
self.password = None
# Torrent Stats
self.minseed = None
self.minleech = None
# URLs
self.url = "http://filelist.ro"
self.urls = {
"login": urljoin(self.url, "takelogin.php"),
"search": urljoin(self.url, "browse.php"),
}
# Proper Strings
self.proper_strings = ["PROPER", "REPACK"]
# Cache
self.cache = tvcache.TVCache(self)
开发者ID:ArthurGarnier,项目名称:SickRage,代码行数:25,代码来源:filelist.py
示例9: crawler
def crawler(self):
parser = argparse.ArgumentParser()
parser.add_argument("keyword", help="keyword that you want to look for")
parser.add_argument("-n", "--number", help="number of search result. default is 5", type=int, default=5)
parser.add_argument("-p", "--page", help="page that you parse", type=int, default=1)
args = parser.parse_args()
url_req = urljoin(self.yt_url, "results?search_query={}&page={}".format(args.keyword, args.page))
page = requests.get(url_req)
collection = []
counter = args.number
tree = html.fromstring(page.text)
for subtree in tree.xpath('//div[@class="yt-lockup-content"]'):
if counter > 0:
item = {}
item['title'] = subtree.xpath('./h3[@class="yt-lockup-title "]/a/text()')[0]
item['link'] = urljoin(self.yt_url, subtree.xpath('./h3[@class="yt-lockup-title "]/a/@href')[0])
item['desc'] = "" if len(subtree.xpath('./div/text()')) == 0 else subtree.xpath('./div/text()')[0]
detail = self.__getdetail(item['link'])
item.update(detail)
short_url = self.__getshorturl(item['link'])
item.update(short_url)
collection.append(YTSearchResult(**item))
counter -= 1
else:
break;
return collection
开发者ID:yltsou,项目名称:youtube-CLI,代码行数:34,代码来源:youtube.py
示例10: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, "PhxBit")
# Credentials
self.username = None
self.password = None
# Torrent Stats
self.minseed = None
self.minleech = None
# URLs
self.url = 'https://phxbit.com'
self.urls = {
'login': urljoin(self.url, '/connect.php'),
'search': urljoin(self.url, '/sphinx.php')
}
# Proper Strings
self.proper_strings = ['PROPER']
# Cache
self.cache = tvcache.TVCache(self, min_time=30)
开发者ID:DazzFX,项目名称:SickRage,代码行数:25,代码来源:phxbit.py
示例11: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, "Immortalseed")
# Credentials
self.username = None
self.password = None
self.passkey = None
# Torrent Stats
self.minseed = None
self.minleech = None
self.freeleech = None
# URLs
self.url = 'https://immortalseed.me/'
self.urls = {
'login': urljoin(self.url, 'takelogin.php'),
'search': urljoin(self.url, 'browse.php'),
'rss': urljoin(self.url, 'rss.php'),
}
# Proper Strings
self.proper_strings = ['PROPER', 'REPACK']
# Cache
self.cache = ImmortalseedCache(self, min_time=20)
开发者ID:murbaniak,项目名称:SickRage,代码行数:28,代码来源:immortalseed.py
示例12: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, "ABNormal")
# Credentials
self.username = None
self.password = None
# Torrent Stats
self.ratio = None
self.minseed = None
self.minleech = None
# URLs
self.url = "https://abnormal.ws"
self.urls = {
"login": urljoin(self.url, "login.php"),
"search": urljoin(self.url, "torrents.php"),
}
# Proper Strings
self.proper_strings = ["PROPER"]
# Cache
self.cache = tvcache.TVCache(self, min_time=30)
开发者ID:piejanssens,项目名称:SickRage-1,代码行数:26,代码来源:abnormal.py
示例13: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, 'TorrentLeech')
# Credentials
self.username = None
self.password = None
# URLs
self.url = 'https://torrentleech.org'
self.urls = {
'login': urljoin(self.url, 'user/account/login/'),
'search': urljoin(self.url, 'torrents/browse'),
}
# Proper Strings
self.proper_strings = ['PROPER', 'REPACK']
# Miscellaneous Options
# Torrent Stats
self.minseed = None
self.minleech = None
# Cache
self.cache = tvcache.TVCache(self)
开发者ID:Eiber,项目名称:SickRage-Medusa,代码行数:27,代码来源:torrentleech.py
示例14: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, 'TorrentBytes')
# Credentials
self.username = None
self.password = None
# URLs
self.url = 'https://www.torrentbytes.net'
self.urls = {
'login': urljoin(self.url, 'takelogin.php'),
'search': urljoin(self.url, 'browse.php')
}
# Proper Strings
self.proper_strings = ['PROPER', 'REPACK']
# Miscellaneous Options
self.freeleech = False
# Torrent Stats
self.minseed = None
self.minleech = None
# Cache
self.cache = tvcache.TVCache(self)
开发者ID:Eiber,项目名称:SickRage-Medusa,代码行数:28,代码来源:torrentbytes.py
示例15: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, "ThePirateBay")
# Credentials
self.public = True
# Torrent Stats
self.minseed = None
self.minleech = None
self.confirmed = True
# URLs
self.url = "https://thepiratebay.se"
self.urls = {
"rss": [urljoin(self.url, "browse/208/0/4/0"), urljoin(self.url, "browse/205/0/4/0")],
"search": urljoin(self.url, "search"),
}
self.custom_url = None
# Proper Strings
# Cache
self.cache = tvcache.TVCache(self, min_time=30) # only poll ThePirateBay every 30 minutes max
self.magnet_regex = re.compile(r'magnet:\?xt=urn:btih:\w{32,40}(:?&dn=[\w. %+-]+)*(:?&tr=(:?tcp|https?|udp)[\w%. +-]+)*')
开发者ID:Zelgadis87,项目名称:SickRage,代码行数:27,代码来源:thepiratebay.py
示例16: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, 'Danishbits')
# Credentials
self.username = None
self.password = None
# Torrent Stats
self.minseed = 0
self.minleech = 0
self.freeleech = True
# URLs
self.url = 'https://danishbits.org'
self.urls = {
'login': urljoin(self.url, 'login.php'),
'search': urljoin(self.url, 'torrents.php'),
}
# Proper Strings
# Miscellaneous Options
# Torrent Stats
# Cache
self.cache = tvcache.TVCache(self, min_time=10) # Only poll Danishbits every 10 minutes max
开发者ID:Eiber,项目名称:SickRage-Medusa,代码行数:29,代码来源:danishbits.py
示例17: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, 'YggTorrent')
# Credentials
self.username = None
self.password = None
# Torrent Stats
self.minseed = None
self.minleech = None
# URLs
self.custom_url = None
self.url = 'https://www.yggtorrent.is/'
self.urls = {
'login': urljoin(self.url, 'user/login'),
'search': urljoin(self.url, 'engine/search')
}
# Proper Strings
self.proper_strings = ['PROPER']
# Cache
self.cache = tvcache.TVCache(self, min_time=30)
开发者ID:shtrom,项目名称:SickRage,代码行数:26,代码来源:yggtorrent.py
示例18: __init__
def __init__(self):
"""Initialize the class."""
super(ShazbatProvider, self).__init__('Shazbat.tv')
# Credentials
self.passkey = None
# URLs
self.url = 'http://www.shazbat.tv'
self.urls = {
'login': urljoin(self.url, 'login'),
'rss_recent': urljoin(self.url, 'rss/recent'),
# 'rss_queue': urljoin(self.url, 'rss/download_queue'),
# 'rss_followed': urljoin(self.url, 'rss/followed')
}
# Proper Strings
# Miscellaneous Options
self.supports_backlog = False
self.options = None
# Torrent Stats
# Cache
self.cache = ShazbatCache(self, min_time=20)
开发者ID:pymedusa,项目名称:SickRage,代码行数:26,代码来源:shazbat.py
示例19: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, 'TorrentDay')
# Credentials
self.username = None
self.password = None
# Torrent Stats
self.minseed = None
self.minleech = None
self.freeleech = False
# URLs
self.custom_url = None
self.url = 'https://www.torrentday.com'
self.urls = {
'login': urljoin(self.url, '/t'),
'search': urljoin(self.url, '/t.json'),
'download': urljoin(self.url, '/download.php/')
}
self.categories = {
'Season': {'14': 1},
'Episode': {'2': 1, '26': 1, '7': 1, '24': 1, '34': 1},
'RSS': {'2': 1, '26': 1, '7': 1, '24': 1, '34': 1, '14': 1}
}
self.enable_cookies = True
# Cache
self.cache = tvcache.TVCache(self, min_time=10) # Only poll IPTorrents every 10 minutes max
开发者ID:ArthurGarnier,项目名称:SickRage,代码行数:33,代码来源:torrentday.py
示例20: __init__
def __init__(self):
# Provider Init
TorrentProvider.__init__(self, 'ILoveTorrents')
# Credentials
self.username = None
self.password = None
# URLs
self.url = 'https://www.ilovetorrents.me/'
self.urls = {
'login': urljoin(self.url, 'takelogin.php'),
'search': urljoin(self.url, 'browse.php'),
'download': urljoin(self.url, '{link}'),
}
# Proper Strings
self.proper_strings = ['PROPER', 'REPACK', 'REAL']
# Miscellaneous Options
# Torrent Stats
self.minseed = None
self.minleech = None
# Cache
self.cache = tvcache.TVCache(self)
开发者ID:Eiber,项目名称:SickRage-Medusa,代码行数:28,代码来源:ilovetorrents.py
注:本文中的requests.compat.urljoin函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论