Commit d0bd152d authored by liyang's avatar liyang

feat:instagram 适配windows

parent 1c82751a
...@@ -35,7 +35,7 @@ def reptile(browser=None, search_word=""): ...@@ -35,7 +35,7 @@ def reptile(browser=None, search_word=""):
""" """
print(f"搜索词:{search_word}") print(f"搜索词:{search_word}")
base_url = "https://www.dcard.tw" base_url = "https://www.dcard.tw"
browser = browser or create(no_headless=False, using_user_data=True) browser = browser or create(no_headless=True, using_user_data=True)
# 打开网页 # 打开网页
# browser.get(base_url) # browser.get(base_url)
# time.sleep(3) # time.sleep(3)
......
...@@ -30,7 +30,7 @@ from selenium.webdriver.support import expected_conditions as EC ...@@ -30,7 +30,7 @@ from selenium.webdriver.support import expected_conditions as EC
def reptile(browser=None, search_word=""): def reptile(browser=None, search_word=""):
print(f"搜索词:{search_word}") print(f"搜索词:{search_word}")
url = "https://www.facebook.com/" url = "https://www.facebook.com/"
browser = browser or create(no_headless=False,using_user_data=True) browser = browser or create(no_headless=True,using_user_data=True)
# 打开网页 # 打开网页
browser.get(url) browser.get(url)
try: try:
......
...@@ -27,7 +27,7 @@ def reptile(browser=None, search_word=""): ...@@ -27,7 +27,7 @@ def reptile(browser=None, search_word=""):
:param search_word: :param search_word:
:return: :return:
""" """
browser = browser or create(no_headless=False, using_user_data=True) browser = browser or create(no_headless=True, using_user_data=False)
# print(browser) # print(browser)
# 打开网页 # 打开网页
url = f'https://www.youtube.com/results?search_query={search_word}' url = f'https://www.youtube.com/results?search_query={search_word}'
......
...@@ -21,6 +21,7 @@ Pillow==10.0.0 ...@@ -21,6 +21,7 @@ Pillow==10.0.0
pipreqs==0.4.13 pipreqs==0.4.13
PyMySQL==1.1.0 PyMySQL==1.1.0
PySocks==1.7.1 PySocks==1.7.1
pytesseract==0.3.10
python-dateutil==2.8.2 python-dateutil==2.8.2
python-dotenv==1.0.0 python-dotenv==1.0.0
pytube==15.0.0 pytube==15.0.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment