This file contains 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
// Modifier: user237 | |
// Forked from: https://gist.github.com/silver-mixer/43009c048a5e7e60f2182198ad0a105b | |
// Description: To download a list of video metadata of any public or private youtube playlist, as a json document, run this script on the playlist page. | |
// date created: 2023-09-02 | |
(() => { | |
const VERSION = "user237_v1"; | |
const REGEX_LIST_ID = /\?list=([a-zA-Z0-9-_]+)($|&)/; | |
const REGEX_TIMELEFT = /t=([0-9]+)/; // get the first capture group using [1] |
This file contains 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 bs4 import BeautifulSoup | |
import requests | |
from pprint import pprint | |
import time | |
from cnd_login import KEY, USERNAME, COOKIE, HEADERS | |
BASE_URL = "edge.cindicator.com" | |
TARGET_URL = "https://edge.cindicator.com/indicators" | |
LOGIN_URL = "https://edge.cindicator.com/login" | |
OUTPUT_FILENAME = "cnd_indicators.html" |
This file contains 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 as req | |
NEW_AGENT = "USER_AGENT_HERE" | |
def change_user_agent(new_agent): | |
req.utils.default_user_agent = lambda: new_agent | |
def get_user_agent(): | |
url = 'https://httpbin.org/user-agent' | |
response = req.get(url) |