ist die Liste mit den URLs zum Download einer Filmliste
771168
public boolean addWithCheck(DatenFilmlisteUrl filmliste) {
        for (DatenFilmlisteUrl datenUrlFilmliste : this) {
            if (datenUrlFilmliste.arr[DatenFilmlisteUrl.FILM_UPDATE_SERVER_URL_NR].equals(filmliste.arr[DatenFilmlisteUrl.FILM_UPDATE_SERVER_URL_NR])) {
                return false;
            }
        }
        return add(filmliste);
    }
329044
def Descargar(self, url=URL, filename="padron.txt", proxy=None):
        ""
        proxies = {}
        if proxy:
            proxies['http'] = proxy
            proxies['https'] = proxy
            proxy_handler = urllib2.ProxyHandler(proxies)
        print "Abriendo URL %s ..." % url
        req = urllib2.Request(url)
        if os.path.exists(filename):
            http_date = formatdate(timeval=os.path.getmtime(filename), 
                                   localtime=False, usegmt=True)  
            req.add_header('If-Modified-Since', http_date)
        try:
            web = urllib2.urlopen(req)
        except urllib2.HTTPError, e:
            if e.code == 304:
                print "No modificado desde", http_date
                return 304
            else:
                raise
        # leer info del request:
        meta = web.info()
        lenght = float(meta['Content-Length'])
        date = meta['Last-Modified']
        tmp = open(filename + ".zip", "wb")
        print "Guardando"
        size = 0
        p0 = None
        while True:
            p = int(size / lenght * 100)
            if p0 is None or p>p0:
                print "Leyendo ... %0d %%" % p
                p0 = p
            data = web.read(1024*100)
            size = size + len(data)
            if not data:
                print "Descarga Terminada!"
                break
            tmp.write(data)
        print "Abriendo ZIP..."
        tmp.close()
        web.close()
        uf = open(filename + ".zip", "rb")
        zf = zipfile.ZipFile(uf)
        for fn in zf.namelist():
            print "descomprimiendo", fn
            tf = open(filename, "wb")
            tf.write(zf.read(fn))
            tf.close()
        return 200
362634
private void insertDefaultDifferentialListServers()
    {
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://m.picn.de/f/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://m1.picn.de/f/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://m2.picn.de/f/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://download10.onlinetvrecorder.com/mediathekview/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://mediathekview.jankal.me/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://verteiler1.mediathekview.de/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://verteiler2.mediathekview.de/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://verteiler3.mediathekview.de/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
    }
100392
def filelists
      fl = []
      @repomd.xpath("/xmlns:repomd/xmlns:data[@type=\"filelists\"]/xmlns:location").each do |f|
       fl << File.join(@url, f['href'])
      end
      fl
    end
113085
private static function getExitNodes() {
        $cache = Cache::me(__CLASS__);
        $nodes = $cache->get($key='tor_exit_nodes');

        if ($nodes == null) {

            // Einlesen der Nodes synchronisieren
            synchronized(function() use ($cache, $key, &$nodes) {
                $nodes = $cache->get($key);

                if ($nodes == null) {
                    $content = '';
                    $size = sizeof(self::$torMirrors);

                    for ($i=0; $i < $size; ++$i) {
                        $request = new HttpRequest('http://'.self::$torMirrors[$i].'/ip_list_exit.php/Tor_ip_list_EXIT.csv');
                        try {
                            // TODO: Warnung ausgeben und Reihenfolge aendern, wenn ein Server nicht antwortet
                            $response = (new CurlHttpClient())->send($request);
                            $status   = $response->getStatus();

                            if ($status != 200) {
                                self::$logNotice && Logger::log('Could not get TOR exit nodes from '.self::$torMirrors[$i].', HTTP status '.$status.' ('.HttpResponse::$sc[$status]."),\n URL: ".$request->getUrl(), L_NOTICE);
                                continue;
                            }
                        }
                        catch (IOException $ex) {
                            self::$logNotice && Logger::log('Could not get TOR exit nodes from '.self::$torMirrors[$i], L_NOTICE, ['exception'=>$ex]);
                            continue;
                        }

                        $content = trim($response->getContent());
                        break;
                    }

                    $nodes = strlen($content) ? \array_flip(explode(NL, normalizeEOL($content))) : [];

                    if (!$nodes) Logger::log('Could not get TOR exit nodes from any server', L_ERROR);

                    $cache->set($key, $nodes, 30 * MINUTES);
                }
            });
        }
        return $nodes;
    }
880210
@SuppressWarnings("unchecked")
    public synchronized void themenLaden() {
        Duration.counterStart(THEME_SEARCH_TEXT);
        LinkedHashSet<String> senderSet = new LinkedHashSet<>(21);
        // der erste Sender ist ""
        senderSet.add("");

        for (DatenFilm film : this) {
            senderSet.add(film.arr[DatenFilm.FILM_SENDER]);
        }
        sender = senderSet.toArray(new String[senderSet.size()]);
        senderSet.clear();

        //für den Sender "" sind alle Themen im themenPerSender[0]
        final int senderLength = sender.length;
        themenPerSender = new String[senderLength][];
        TreeSet<String>[] tree = (TreeSet<String>[]) new TreeSet<?>[senderLength];
        HashSet<String>[] hashSet = (HashSet<String>[]) new HashSet<?>[senderLength];
        for (int i = 0; i < tree.length; ++i) {
            tree[i] = new TreeSet<>(de.mediathekview.mlib.tool.GermanStringSorter.getInstance());
            tree[i].add("");
            hashSet[i] = new HashSet<>();
        }

        //alle Themen
        String filmThema, filmSender;
        for (DatenFilm film : this) {
            filmSender = film.arr[DatenFilm.FILM_SENDER];
            filmThema = film.arr[DatenFilm.FILM_THEMA];
            //hinzufügen
            if (!hashSet[0].contains(filmThema)) {
                hashSet[0].add(filmThema);
                tree[0].add(filmThema);
            }
            for (int i = 1; i < senderLength; ++i) {
                if (filmSender.equals(sender[i])) {
                    if (!hashSet[i].contains(filmThema)) {
                        hashSet[i].add(filmThema);
                        tree[i].add(filmThema);
                    }
                }
            }
        }
        for (int i = 0; i < themenPerSender.length; ++i) {
            themenPerSender[i] = tree[i].toArray(new String[tree[i].size()]);
            tree[i].clear();
            hashSet[i].clear();
        }
        Duration.counterStop(THEME_SEARCH_TEXT);
    }
129777
public function filesAction()
    {
        //formularz
        $form = new Form\ConnectorImportFilesForm;
        //formularz zapisany
        if ($form->isSaved()) {
            //przekazanie listy plików do downloadu
            $this->view->files = $form->getOption('data');
            //otwarcie sesji
            $session = new \Mmi\Session\SessionSpace(\Cms\Model\ConnectorModel::SESSION_SPACE);
            $this->view->downloadUrl = base64_encode($session->url);
        } else {
            //form do widoku
            $this->view->form = $form;
        }
    }
507376
public synchronized void filmeBeimSenderLaden(ListeFilme listeFilme) {
    initStart(listeFilme);
    // die mReader nach Prio starten
    mrStarten(0);
    if (!Config.getStop()) {
      // waren und wenn Suchlauf noch nicht abgebrochen weiter mit dem Rest
      mrWarten();
      mrStarten(1);
      allStarted = true;
    }
  }
227568
@Override
  public synchronized void addToList() {
    meldungStart();
    //Theman suchen
    listeThemen.clear();
    addToList__();
    if (CrawlerTool.loadLongMax()) {
      addToList_verpasst(); // brauchst eigentlich nicht und dauer zu lange
    }
    if (Config.getStop()) {
      meldungThreadUndFertig();
    } else if (listeThemen.isEmpty()) {
      meldungThreadUndFertig();
    } else {
      meldungAddMax(listeThemen.size());
      for (int t = 0; t < getMaxThreadLaufen(); ++t) {
        Thread th = new ThemaLaden();
        th.setName(SENDERNAME + t);
        th.start();
      }
    }
  }
884946
@WorkerThread
    public ArrayList<AlbumFolder> getAllVideo() {
        Map<String, AlbumFolder> albumFolderMap = new HashMap<>();
        AlbumFolder allFileFolder = new AlbumFolder();
        allFileFolder.setChecked(true);
        allFileFolder.setName(mContext.getString(R.string.album_all_videos));

        scanVideoFile(albumFolderMap, allFileFolder);

        ArrayList<AlbumFolder> albumFolders = new ArrayList<>();
        Collections.sort(allFileFolder.getAlbumFiles());
        albumFolders.add(allFileFolder);

        for (Map.Entry<String, AlbumFolder> folderEntry : albumFolderMap.entrySet()) {
            AlbumFolder albumFolder = folderEntry.getValue();
            Collections.sort(albumFolder.getAlbumFiles());
            albumFolders.add(albumFolder);
        }
        return albumFolders;
    }
616231
def parse(filename):
    
    screensize = re.compile('720p|1080p', re.I)
    source = re.compile(
        '\.(AHDTV|MBluRay|MDVDR|CAM|TS|TELESYNC|DVDSCR|DVD9|BDSCR|DDC|R5LINE|R5|DVDRip|HDRip|BRRip|BDRip|WEBRip|WEB-?HD|HDtv|PDTV|WEBDL|BluRay)', re.I)
    year = re.compile('(1|2)\d{3}')
    series = re.compile('s\d{1,3}e\d{1,3}', re.I)
    group = re.compile('[A-Za-z0-9]+$', re.I)
    video = re.compile('DVDR|Xvid|MP4|NTSC|PAL|[xh][\.\s]?264', re.I)
    audio = re.compile('AAC2[\.\s]0|AAC|AC3|DTS|DD5', re.I)
    edition = re.compile(
        '\.(UNRATED|DC|(Directors|EXTENDED)[\.\s](CUT|EDITION)|EXTENDED|3D|2D|\bNF\b)',
        re.I)
    tags = re.compile(
        '\.(COMPLETE|LiMiTED|DL|DUAL|iNTERNAL|UNCUT|FS|FESTIVAL|DOKU|DOCU|DUBBED|SUBBED|WS)', re.I)
    release = re.compile(
        'REAL[\.\s]PROPER|REMASTERED|PROPER|REPACK|READNFO|READ[\.\s]NFO|DiRFiX|NFOFiX', re.I)
    subtitles = re.compile(
        '\.(MULTi(SUBS)?|FiNNiSH|NORDiC|DANiSH|SWEDiSH|NORWEGiAN|iTALiAN|SPANiSH|SWESUB)', re.I)
    language = re.compile('\.(German|ITALIAN|Chinese|CZECH|RUSSIAN|FRENCH|TRUEFRENCH)', re.I)

    title = filename
    attrs = {'screenSize': screensize,
             'source': source,
             'year': year,
             'series': series,
             'release_group': group,
             'video': video,
             'audio': audio,
             'edition': edition,
             'tags': tags,
             'release': release,
             'subtitles': subtitles,
             'language': language
             }
    data = {}
    for attr in attrs:
        match = methodcaller('search', filename)(attrs[attr])
        if match:
            matched = methodcaller('group')(match)
            data[attr] = matched.strip('.')
            title = re.sub(matched, '', title)
    if 'series' in data:
        s, e = re.split('e|E', data['series'])
        # use lstrip to remove leading zeros
        data['season'] = s[1:].lstrip('0')
        data['episode'] = e.lstrip('0')
        data['series'] = True
    temptitle = title.replace('.', ' ').strip('-').strip()
    data['title'] = re.sub('\s{2,}', ' ', temptitle)
    return data
633327
public function indexAction()
    {
        //formularz
        $form = new Form\ConnectorImportContentForm;
        //formularz zapisany + przejście do importu plików
        if ($form->isSaved() && $form->getElement('file')) {
            $this->getMessenger()->addMessage('messenger.connector.import.success', true);
            $this->getResponse()->redirect('cmsAdmin', 'connector', 'files');
        }
        //form zapisany bez importu plików
        if ($form->isSaved()) {
            $this->getMessenger()->addMessage('messenger.connector.import.ended', true);
            $this->getResponse()->redirect('cmsAdmin', 'index', 'index');
        }
        //form do widoku
        $this->view->form = $form;
    }
1256104
public ResultList<MovieBasic> getGenreMovies(int genreId, String language, Integer page, Boolean includeAllMovies, Boolean includeAdult) throws MovieDbException {
        TmdbParameters parameters = new TmdbParameters();
        parameters.add(Param.ID, genreId);
        parameters.add(Param.LANGUAGE, language);
        parameters.add(Param.PAGE, page);
        parameters.add(Param.INCLUDE_ALL_MOVIES, includeAllMovies);
        parameters.add(Param.INCLUDE_ADULT, includeAdult);

        URL url = new ApiUrl(apiKey, MethodBase.GENRE).subMethod(MethodSub.MOVIES).buildUrl(parameters);
        String webpage = httpTools.getRequest(url);

        WrapperGenericList<MovieBasic> wrapper = processWrapper(getTypeReference(MovieBasic.class), url, webpage);
        return wrapper.getResultsList();
    }
935480
def _download(self, videofile):
        
        basename = os.path.basename(videofile)

        subinfos = []
        for subsearcher in self.subsearcher:
            self.logger.info(
                '{0}：开始使用 {1} 搜索字幕'.format(basename, subsearcher))
            try:
                subinfos = subsearcher.search_subs(
                    videofile, self.languages, self.exts)
            except Exception as e:
                err = str(e)
                if self.debug:
                    err = traceback.format_exc()
                self.logger.error(
                    '{}：搜索字幕发生错误： {}'.format(basename, err))
                continue
            if subinfos:
                break
        self.logger.info('{1}：找到 {0} 个字幕, 准备下载'.format(
            len(subinfos), basename))
        try:
            for subinfo in subinfos:
                downloaded = subinfo.get('downloaded', False)
                if downloaded:
                    if isinstance(subinfo['subname'], (list, tuple)):
                        self._history[videofile].extend(subinfo['subname'])
                    else:
                        self._history[videofile].append(subinfo['subname'])
                else:
                    link = subinfo.get('link')
                    subname = subinfo.get('subname')
                    subpath = os.path.join(os.path.dirname(videofile), subname)
                    res = self.session.get(link, stream=True)
                    with open(subpath, 'wb') as fp:
                        for chunk in res.iter_content(8192):
                            fp.write(chunk)
                    self._history[videofile].append(subpath)
        except Exception as e:
            self.logger.error(str(e))
528576
public ResultList<MovieBasic> getRatedMovies(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
        TmdbParameters parameters = new TmdbParameters();
        parameters.add(Param.SESSION_ID, sessionId);
        parameters.add(Param.ID, accountId);
        parameters.add(Param.PAGE, page);
        parameters.add(Param.SORT_BY, sortBy);
        parameters.add(Param.LANGUAGE, language);

        URL url = new ApiUrl(apiKey, MethodBase.ACCOUNT).subMethod(MethodSub.RATED_MOVIES).buildUrl(parameters);
        WrapperGenericList<MovieBasic> wrapper = processWrapper(getTypeReference(MovieBasic.class), url, "rated movies");
        return wrapper.getResultsList();
    }
81164
public function getFileObjects()
    {
        $fileObjects = [];
        //iteracja po unikalnych obiektach
        foreach ((new \Cms\Orm\CmsFileQuery)->findUnique('object') as $object) {
            //pominięcie plików tymczasowych
            if ('tmp-' == substr($object, 0, 4)) {
                continue;
            }
            //dodanie pliku
            $fileObjects[$object] = $object;
        }
        return $fileObjects;
    }
1204695
public List<RTMovie> getMoviesSearch(String query) throws RottenTomatoesException {
        return getMoviesSearch(query, DEFAULT_PAGE_LIMIT, DEFAULT_PAGE);
    }