Skip to content

Instantly share code, notes, and snippets.

@takidog
Created June 16, 2019 18:13
Show Gist options
  • Save takidog/a0fd52ad3eda4f335fc5383c1bc38eaf to your computer and use it in GitHub Desktop.
Save takidog/a0fd52ad3eda4f335fc5383c1bc38eaf to your computer and use it in GitHub Desktop.
# for verystream
from bs4 import BeautifulSoup
import requests
import sys
if __name__ == "__main__":
try:
if sys.argv[1]:
url = sys.argv[1]
except:
url = input('url : ')
wow = requests.session()
res = wow.get(url=url)
decodewow = BeautifulSoup(res.text, 'html.parser')
data = decodewow.find(id='videolink')
# print(data.text)
base_url = "https://verystream.com/gettoken/"+data.text+"?mime=true"
res = wow.get(url=base_url, allow_redirects=False)
print('\n', res.headers['Location'])
# print(res.url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment