Skip to content

Instantly share code, notes, and snippets.

View sanjaymhj's full-sized avatar
👋
</>

Sanjay Maharjan sanjaymhj

👋
</>
View GitHub Profile
@sanjaymhj
sanjaymhj / Youtube-mp3.py
Last active November 30, 2017 16:27
Download the mp3 of the youtube video
from bs4 import BeautifulSoup
import urllib2
import urlparse
import re
import string
import sys
import wget
import os
result = {"videoID": "", "name": ""}
@sanjaymhj
sanjaymhj / URL+Extension.swift
Created June 13, 2017 05:28
URL Extension to Create Query Parameter
extension URL {
/*
Get the query parameters from the URL.
*/
var queryParameters: [String: String]? {
var params = [String: String]()
return URLComponents(url: self, resolvingAgainstBaseURL: false)?
.queryItems?
.reduce([:], { (_, item) -> [String: String] in