Skip to content

Instantly share code, notes, and snippets.

View c0deful's full-sized avatar
🐢

Dominik Plewa c0deful

🐢
  • Software Engineer
  • Warsaw, Poland
  • LinkedIn in/dplewa
View GitHub Profile
{
"basics": {
"name": "Dominik Plewa",
"label": "Full Stack Developer | Java | React.js",
"picture": "https://github.com/c0deful.png",
"email": "dominik@codeful.it",
"phone": "",
"website": "",
"summary": "",
"location": {
@c0deful
c0deful / whu-spider.py
Created January 19, 2018 13:36
Warhammer Underworlds Library card image scrapper
import json, urllib.request, urllib.parse
# API url can be found in WHU Library JS source:
# https://warhammerunderworlds.com/wp-content/themes/gw-shadespire/library/js/main.js?ver=5.3
CARDS_JSON_URL = 'https://warhammerunderworlds.com/wp-json/wp/v2/cards/?per_page=300&lang=ENG'
opener = urllib.request.build_opener()
# urllib is banned on the server, so provide an innocent user agent
opener.addheaders = [('User-Agent', 'Mozilla/5.0 (X11; U; Linux i686) Gecko/20071127 Firefox/2.0.0.11')]