# for www.torn.com/forums

# domain is protected with Cloudflare's bot-or-human challenge
#
# This works NOT with ftr.fivefilters.net (FTR|Fulltext-RSS)
# This works NOT with wallabag UI
#
# This only works with wallabagger browser-plugin with activated
# option 'Retrieve content from the browser' in it's settings
#
http_header(User-Agent): Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0

## self-hosters may copy 'cf_clearance' cookie from their browser into the following line
## remove the '#' to activate. The cookie seems to be valid for one year.
## additionally you hav to change the URL: after forums.php it must be `?key=value` and not `#/key=value`
## Then catch works with wallabag UI and FTR

#http_header(cookie): cf_clearance=abc...very.long...xyz


title: //div[@id='topic-title']/@title
body: //div[@class='forums-thread']/ul/li/div

strip_id_or_class: topic-title
strip_id_or_class: info

strip_id_or_class: stats
strip_id_or_class: level
strip_id_or_class: posts
strip_id_or_class: karma
strip_id_or_class: last-act
strip_id_or_class: empty-prop
strip_id_or_class: report
strip_id_or_class: tooltip
strip_id_or_class: confirm-wrap
strip_id_or_class: copy-post-link

strip: //div[contains(@class, 'honor-text-wrap')]/img/following-sibling::text()

next_page_link: (//div[contains(@class, 'pagination')]/a[not(contains(@class, 'page-number'))])[2]

# change some class names, that are used by wallabag

find_string: class="thread-list cont-gray bottom-round"
replace_string: class="foobar-cntnt"

find_string: left"
replace_string: foobar-l"

find_string: class="poster white-grad">
replace_string: class="poster white-grad hr"><hr>


test_url: https://www.torn.com/forums.php?p=threads&f=61&t=16348846&b=0&a=0
