changed error handling of media script
added target selection based on profileslug
included youtube script