-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21b8866
commit ca9b83b
Showing
4 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
downloads/* | ||
.idea/ | ||
ferret/ferret.log |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Login | ||
LET login = DOCUMENT("https://dzone.com/users/login.html", true) | ||
LET login_btn = ELEMENT(login, "button[type=submit]") | ||
INPUT(login, "form[role=form] input[name=j_username]", "[email protected]", 5) | ||
INPUT(login, "form[role=form] input[name=j_password]", "password123456", 5) | ||
CLICK(login_btn) | ||
WAIT_NAVIGATION(login) | ||
|
||
// Refcardz | ||
LET refcardz = DOCUMENT("https://dzone.com/users/3590306/dzone-refcardz.html?sort=saved", true) | ||
WAIT_ELEMENT(refcardz, 'p[class=comment-title]', 25000) | ||
FOR el IN ELEMENTS(refcardz, "p[class=comment-title]") | ||
RETURN ELEMENT(el, "a") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
echo 'Remove alpeware/chrome-headless-stable container including the volume' | ||
docker stop chrome-headless | ||
sleep 5 | ||
docker rm -v chrome-headless | ||
sudo rm -rf /tmp/chromedata | ||
|
||
echo 'Starting alpeware/chrome-headless-stable Docker container' | ||
docker pull alpeware/chrome-headless-stable | ||
docker run -d -p=127.0.0.1:9222:9222 --name=chrome-headless -v /tmp/chromedata/:/data alpeware/chrome-headless-stable |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
echo 'Running dzone-refcardz.fql via headless Chrome' | ||
ferret -time --cdp http://127.0.0.1:9222 dzone-refcardz.fql |