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

Add support for akvideo #23039

Open
etmatrix opened this issue Nov 10, 2019 · 0 comments
Open

Add support for akvideo #23039

etmatrix opened this issue Nov 10, 2019 · 0 comments

Comments

@etmatrix
Copy link

@etmatrix etmatrix commented Nov 10, 2019

Checklist

  • I'm reporting a new site support request
  • I've verified that I'm running youtube-dl version 2019.11.05
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that none of provided URLs violate any copyrights
  • I've searched the bugtracker for similar site support requests including closed ones

Example URLs

Description

I already developed an extractor, works but is not very good.
AKVideo support more formats: low, normal and high resolution.
For extract all resolutions I need to get a webpage for each format over the main get, but before generate a new url akvideo require a sleep time.
Can I extract the real url after the user choose the format?
Now I extract all urls and return the array formats.

class AKVideoIE(InfoExtractor):
    _VALID_URL = r'https?://akvideo\.stream/video/(?P<id>\w+)'

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id)

        title = ''
        formats = []
        videoinfo = re.findall(r'download_video\(\'' + video_id + '\',\'(\w)\',\'(.*)\'\)".*<td nowrap *>(\d+)x(\d+)', webpage)
        for info in videoinfo:
            webpage = self._download_webpage('https://akvideo.stream/dl?op=download_orig&id=' + video_id + '&mode=' + info[0] + '&hash=' + info[1], video_id)

            movie_url = re.findall(r'<a class="dwnb" href="(.*?)"', webpage)
            title = str(movie_url[0]).split("/")[-1]

            formats.append({'url': movie_url[0], 'height': int(info[3]), 'width': int(info[2]) })
            time.sleep(3)

        self._sort_formats(formats)

        return {
            'id':          video_id,
            'title':       title,
            'description': title,
            'formats':     formats
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.