This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import unicode_literals | |
import youtube_dl | |
ydl = youtube_dl.YoutubeDL({'outtmpl': '%(id)s%(ext)s'}) | |
url = raw_input("Give the URL of video which you want to stream? \n") | |
with ydl: | |
result = ydl.extract_info( | |
url, | |
download=False # We just want to extract the info | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
from time import sleep | |
http_proxy = "http://10.3.100.207:8080" | |
https_proxy = "https://10.3.100.207:8080" | |
proxyDict = { | |
"http" : http_proxy, | |
"https" : https_proxy | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
from time import sleep | |
## We had proxy enabled in our institute. Comment the below lines if not needed. | |
http_proxy = "http://host:port" | |
https_proxy = "https://host:port" | |
proxyDict = { | |
"http" : http_proxy, | |
"https" : https_proxy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var form_fill = function() { | |
var input = { | |
"confirm_ticket_only": true, //if you want to book only confirmed tickets | |
"auto_upgrade": true, //if you want to use auto upgradation | |
"mobile_number": 9876543210, //Mobile number to which notication is to be sent | |
"persons": [ //details of each adult, max number is 4 | |
{ | |
"name": "Name 1", | |
"age": 0, | |
"gender": 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sys import argv | |
import urllib | |
from bs4 import BeautifulSoup | |
import datetime | |
def ShowHelp(): | |
print 'Insta Image Downloader' | |
print '' | |
print 'Usage:' | |
print 'insta.py [OPTION] [URL]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import urllib | |
import urllib2 | |
import pynotify | |
from time import sleep | |
from random import randint | |
a = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib, urllib2 | |
def getUrl(): | |
print 'Enter URL of image page: ' | |
url = raw_input() | |
return url | |
def getPage(url): | |
response = urllib2.urlopen(url) | |
html = response.read() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import pynotify | |
import re | |
from time import sleep | |
import json | |
#Fuction to show notification using pynotify in Ubuntu | |
def popup(title, message): | |
pynotify.init("Test") | |
pop = pynotify.Notification(title, message) |