mirror of
https://github.com/timberjoegithub/GoogleScrape.git
synced 2026-07-22 00:19:48 +00:00
changed one more instance of timeout
This commit is contained in:
@@ -1370,7 +1370,7 @@ def post_to_wordpress(title,content,headers,date,rating,address,picslist,local_o
|
|||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
image_response = requests.post(env.wpAPI + "/media", headers=headers, \
|
image_response = requests.post(env.wpAPI + "/media", headers=headers, \
|
||||||
files=image,timeout=30)
|
files=image,timeout=env.request_timeout)
|
||||||
except AttributeError as error:
|
except AttributeError as error:
|
||||||
print(" An error uploading picture ' + picname+ ' occurred:", \
|
print(" An error uploading picture ' + picname+ ' occurred:", \
|
||||||
type(error).__name__)
|
type(error).__name__)
|
||||||
@@ -1451,7 +1451,7 @@ def post_to_wordpress(title,content,headers,date,rating,address,picslist,local_o
|
|||||||
# if business_url or business_url is False:
|
# if business_url or business_url is False:
|
||||||
status_message = str(title) + ': Business website: '+ business_url
|
status_message = str(title) + ': Business website: '+ business_url
|
||||||
response_piclinks = requests.post(env.wpAPI+"/posts/"+ str(post_id), \
|
response_piclinks = requests.post(env.wpAPI+"/posts/"+ str(post_id), \
|
||||||
data={"content" : title+' = '+status_message+'\n\n'+content+'\n'+googleadress+'\n'+\
|
data={"content" : title+' - '+status_message+'\n\n'+content+'\n'+googleadress+'\n'+\
|
||||||
rating+contentpics,"featured_media":fmedia,"rank_math_focus_keyword":title},\
|
rating+contentpics,"featured_media":fmedia,"rank_math_focus_keyword":title},\
|
||||||
headers=headers,timeout=env.request_timeout)
|
headers=headers,timeout=env.request_timeout)
|
||||||
print (' ',response_piclinks)
|
print (' ',response_piclinks)
|
||||||
|
|||||||
Reference in New Issue
Block a user