コード例 #1
0
ファイル: __init__.py プロジェクト: crow34/vhsheaven
def feed(idx):
  url = _FEEDLIST[idx]['url']
  if url.endswith('.json'):
    return chanutils.reddit.get_feed(_FEEDLIST[idx])
  else:
    r = get(url)
    return _extract(r.text)
コード例 #2
0
ファイル: __init__.py プロジェクト: erick-guerra/Royalbox
def feed(idx):
  url = _FEEDLIST[idx]['url']
  if url.endswith('.json'):
    return chanutils.reddit.get_feed(_FEEDLIST[idx])
  else:
    r = get(url)
    return _extract(r.text)
コード例 #3
0
ファイル: __init__.py プロジェクト: erick-guerra/Royalbox
def torrent_from_hash(hashid):
  path = "/torrent/" + hashid + ".torrent"
  for site in torr_sites:
    try:
      r = chanutils.get("http://" + site + path)
      return r.content
    except Exception:
      pass
  return None
コード例 #4
0
ファイル: __init__.py プロジェクト: henrytrager/blissflixx
def torrent_files(link):
    if link.startswith("magnet:"):
        torrent = magnet2torrent(link)
    else:
        # Remove any parameters from torrent link
        # as some sites may not download if wrong
        idx = link.find('?')
        if idx > -1:
            link = link[:idx]
        r = chanutils.get(link)
        torrent = r.content

    files = None
    if torrent:
        try:
            parser = TorrentParser(torrent)
            files = parser.get_files_details()
        except Exception, e:
            pass
コード例 #5
0
ファイル: __init__.py プロジェクト: blissland/devflixx
def torrent_files(link):
  if link.startswith("magnet:"):
    torrent = magnet2torrent(link)
  else:
    # Remove any parameters from torrent link
    # as some sites may not download if wrong
    idx = link.find('?')
    if idx > -1:
      link = link[:idx]
    r = chanutils.get(link)
    torrent = r.content

  files = None
  if torrent:
    try:
      parser = TorrentParser(torrent)
      files =  parser.get_files_details()
    except Exception, e:
      pass
コード例 #6
0
ファイル: __init__.py プロジェクト: crow34/vhsheaven
def search(q):
  r = get(_SEARCH_URL, params={'q':q})
  return _extract(r.text)
コード例 #7
0
ファイル: __init__.py プロジェクト: erick-guerra/Royalbox
def search(q):
  r = get(_SEARCH_URL, params={'q':q})
  return _extract(r.text)