This file contains hidden or 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
| docker run -it --rm -p 8000:8000 -u $(id -u ${USER}):$(id -g ${USER}) -v ${PWD}:/app node:12 /bin/bash |
This file contains hidden or 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
| <h1>User List (sort)</h1> | |
| <p><a href="{{ basePath }}/top">Top</a></p> | |
| <p><a href="{{ basePath }}/user/add">Add</a></p> | |
| <div id="userList"> | |
| <table border="1"> | |
| <thead> | |
| <tr> | |
| <th>■</th> |
This file contains hidden or 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
| docker pull scrapinghub/splash | |
| docker run -p 5023:5023 -p 8050:8050 -p 8051:8051 scrapinghub/splash | |
| # source: https://blog.scrapinghub.com/2015/03/02/handling-javascript-in-scrapy-with-splash |
This file contains hidden or 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
| function loadScript(id, url, callback) { | |
| const script = document.createElement('script'); | |
| script.type = 'text/javascript'; | |
| script.id = id; | |
| script.src = url; | |
| // Several events for cross browser compatibility. | |
| script.onreadystatechange = callback; | |
| script.onload = callback; |
This file contains hidden or 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
| from selenium import webdriver | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from webdriver_manager.chrome import ChromeDriverManager | |
| class Autotrader: | |
| def __init__(self, url): | |
| self.url = url | |
| self.driver = None | |
| self.page_num = None | |
| self.xpath_dict = self.XPathDict() |
NewerOlder