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

[blick] Add new extractor (blick.ch is a swiss newspaper platform, wh… #9598

Closed
wants to merge 5 commits into from

Conversation

goggle
Copy link
Contributor

@goggle goggle commented May 24, 2016

…ich provides also videos)

video_id = mobj.group('id')
webpage = self._download_webpage(url, video_id)

found_videos_og = re.findall(r'<meta.*?property="og:video".*?content="(.*?)"', webpage)
Copy link
Contributor

@TRox1972 TRox1972 May 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you checked out _og_search_property?

Copy link
Collaborator

@yan12125 yan12125 May 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_og_search_video_url may be even better.
Sorry _og_search_video_url can't be applied for re.findall, while _og_regexes is still useful.

Copy link
Contributor Author

@goggle goggle May 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using now _og_regexes to do this.

found_videos = []
regex_og = self._og_regexes('video')
regex_ogs = self._og_regexes('video:secure_url')
video_og = self._html_search_regex(regex_og, webpage, name=None, default=None, fatal=False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default=None implies fatal=False.

 - Use _match_id to get the video_id
 - Extract the video title from the webpage instead of the url
 - Removed unnecessary "if entry_info_dict.get('formats'):" check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants