Skip to content

Commit

Permalink
Update something
Browse files Browse the repository at this point in the history
  • Loading branch information
mirusu400 committed Aug 20, 2021
1 parent 901c01b commit 1e67546
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ An **infinite** pinterest crawler, crawl image by page.
# Installation
1. Download requirements
```
git clone https://github.com/mirusu400/Pinterest-crawler
cd Pinterest-crawler
git clone https://github.com/mirusu400/Pinterest-infinite-crawler
cd Pinterest-infinite-crawler
pip install -r requirements.txt
```

Expand Down
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from selenium import webdriver
from pinterest import Pinterest
from sys import exit
import yaml
import os.path

Expand All @@ -8,7 +9,7 @@
email = ""
password = ""
directory = ""
currentdir = os.path.dirname(os.path.realpath(__file__))
currentdir = os.getcwd()
print(currentdir + "/chromedriver.exe")
# Check chromedriver exists
if not os.path.isfile(currentdir + "/chromedriver.exe"):
Expand Down
10 changes: 6 additions & 4 deletions pinterest.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
from selenium import webdriver
from bs4 import BeautifulSoup
import asyncio
from imagehelper import *
from time import sleep
from sys import exit
import asyncio

class Pinterest():
def __init__(self, login, pw):
self.piclist = []
options = webdriver.ChromeOptions()
# options.add_argument('headless')
# options.add_argument('window-size=1920x1080')
# options.add_argument("disable-gpu")
options.add_argument('headless')
options.add_argument('window-size=1920x1080')
options.add_argument("disable-gpu")
self.driver = webdriver.Chrome('chromedriver', chrome_options=options)
try:
self.driver.get("https://pinterest.com/login")
Expand Down

0 comments on commit 1e67546

Please sign in to comment.