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
# -*- coding: utf-8 -*- | |
''' | |
1. Construct the url with num_iid, eg: http://a.m.tmall.com/i15110720150.htm, 15110720150 is the num_iid. | |
2. Get the html text. | |
3. Parse the img urls and insert the num_iid and img urls into sqlite. | |
''' | |
import requests | |
from pyquery import PyQuery as pq |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
set theDate to do shell script "date '+%Y-%m-%d'" | |
set outputPath to "~/Dropbox/mytemp/" | |
set format to "txt" | |
set counter to 1 | |
set theFolder to "Notes" | |
-- uses a counter to avoid duplicate filenames if notes have the same title | |
tell application "Notes" | |
tell folder theFolder | |
set theNotes to every note |
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
tell application "TextEdit" | |
activate | |
make new document | |
end tell | |
tell application "Notes" | |
if folder "Archive" exists then | |
set output to "" | |
repeat with aNote in notes in folder "Archive" |
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
tell application "TextEdit" | |
activate | |
make new document | |
end tell | |
tell application "Notes" | |
if folder "Archive" exists then | |
set output to "" | |
repeat with aNote in notes in folder "Archive" |