package com.todoist.mediaparser.mediaparser;

import com.todoist.mediaparser.util.MediaType;

import java.util.regex.Pattern;

public class ScreenrParser extends BaseOEmbedMediaParser {
	private static Pattern sMatchingPattern;

	ScreenrParser(String url) {
		super(url);
	}

	@Override
	public MediaType getContentMediaType() {
		return MediaType.VIDEO;
	}

	@Override
	protected Pattern getMatchingPattern() {
		if(sMatchingPattern == null)
			sMatchingPattern = Pattern.compile("https?://(?:www\\.)?screenr\\.com/\\w+/?", Pattern.CASE_INSENSITIVE);
		return sMatchingPattern;
	}

	@Override
	protected String getOEmbedUrlTemplate() {
		return "http://www.screenr.com/api/oembed.json?url=%s";
	}

	@Override
	protected String getOEmbedThumbnailUrlName() {
		return "thumbnail_url";
	}
}

@@ -572,24 +572,278 @@
 attern;%0A%09%7D%0A%0A
+%09@Override%0A%09protected String createThumbnailUrl(int smallestSide) %7B%0A%09%09String thumbnailUrl = super.createThumbnailUrl(smallestSide);%0A%09%09if(smallestSide %3E 110)%0A%09%09%09return thumbnailUrl.replaceFirst(%22_thumb%5C%5C.jpg$%22, %22.jpg%22);%0A%09%09else%0A%09%09%09return thumbnailUrl;%0A%09%7D%0A%0A
 %09@Override%0A%09

Support larger thumbnails on screenr.com