Skip to content

Instantly share code, notes, and snippets.

import argparse
import os
import re
import threading
import urllib
import requests
import sys
urls = []
global stop
http://www.daniweb.com/software-development/python/tutorials/238590/simple-threading-tutorial
http://effbot.org/zone/thread-synchronization.htm
http://www.laurentluce.com/posts/python-threads-synchronization-locks-rlocks-semaphores-conditions-events-and-queues/
Add a new thread
Thread is scanned, and every image is added to a temp list (?)
Once the temp list if filled, lock global list
add links
release lock
function GM_openInTab(_url) {
self.port.emit("GM_openInTab", _url);
};
function GM_setValue(_name, _value) {
localStorage[_name] = _value;
};
function GM_getValue(_name, _default) {
if (localStorage[_name] === null && _default === null) return undefined;