all http requests using the same user-agent
This commit is contained in:
4
core.py
4
core.py
@@ -362,7 +362,7 @@ def download_file_with_filename(url, filename, path, conf: config.Config, filepa
|
|||||||
os.makedirs(path)
|
os.makedirs(path)
|
||||||
proxies = configProxy.proxies()
|
proxies = configProxy.proxies()
|
||||||
headers = {
|
headers = {
|
||||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'}
|
'User-Agent': G_USER_AGENT}
|
||||||
r = requests.get(url, headers=headers, timeout=configProxy.timeout, proxies=proxies)
|
r = requests.get(url, headers=headers, timeout=configProxy.timeout, proxies=proxies)
|
||||||
if r == '':
|
if r == '':
|
||||||
print('[-]Movie Data not found!')
|
print('[-]Movie Data not found!')
|
||||||
@@ -374,7 +374,7 @@ def download_file_with_filename(url, filename, path, conf: config.Config, filepa
|
|||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
os.makedirs(path)
|
os.makedirs(path)
|
||||||
headers = {
|
headers = {
|
||||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'}
|
'User-Agent': G_USER_AGENT}
|
||||||
r = requests.get(url, timeout=configProxy.timeout, headers=headers)
|
r = requests.get(url, timeout=configProxy.timeout, headers=headers)
|
||||||
if r == '':
|
if r == '':
|
||||||
print('[-]Movie Data not found!')
|
print('[-]Movie Data not found!')
|
||||||
|
|||||||
Reference in New Issue
Block a user