add syfaro api key, use user avatar if it exists

This commit is contained in:
Dylan Knutson
2023-04-26 22:02:20 -07:00
parent c16578f2aa
commit 5419b761f3
3 changed files with 4 additions and 4 deletions

View File

@@ -22,6 +22,7 @@ class ApplicationController < ActionController::Base
"9c38727f-f11d-41de-b775-0effd86d520c" => "xjal",
"e38c568f-a24d-4f26-87f0-dfcd898a359d" => "fyacin",
"41fa1144-d4cd-11ed-afa1-0242ac120002" => "soft_fox_lad",
"9b3cf444-5913-4efb-9935-bf26501232ff" => "syfaro",
}
def validate_api_token

View File

@@ -245,9 +245,8 @@ class Domain::Fa::ApiController < ApplicationController
def similar_users_list(list, limit: 10)
list.limit(limit).map do |user|
# TODO - go re-scan all user pages and extract user thumbnail
profile_thumb_url = nil
begin
profile_thumb_url = user.avatar&.file_uri&.to_s
profile_thumb_url || begin
profile_page_response = get_best_user_page_http_log_entry_for(user)
if profile_page_response
parser = Domain::Fa::Parser::Page.new(profile_page_response.contents, require_logged_in: false)

View File

@@ -1,7 +1,7 @@
// ==UserScript==
// @name FuRecs
// @namespace https://twitter.com/DeltaNoises
// @version 1.2
// @version 1.3
// @description FurAffinity User Recommender
// @author https://twitter.com/DeltaNoises
// @match https://www.furaffinity.net/user/*