Fix Freeones search (#1230)

This commit is contained in:
bnkai
2021-03-25 01:01:56 +02:00
committed by GitHub
parent b39fe3ed2b
commit 4299f113e0

View File

@@ -31,33 +31,28 @@ xPathScrapers:
selector: //div[@id="search-result"]//div[@data-test="teaser-subject"]/a/@href selector: //div[@id="search-result"]//div[@data-test="teaser-subject"]/a/@href
postProcess: postProcess:
- replace: - replace:
- regex: ^ - regex: ^
with: https://www.freeones.com with: https://www.freeones.com
- regex: $ - regex: /feed$
with: /profile with: /bio
performerScraper: performerScraper:
performer: performer:
Name: Name:
selector: //h1 selector: //h1
postProcess: postProcess:
- replace: - replace:
- regex: \sBio\s*$ - regex: \sBio\s*$
with: "" with: ""
URL: URL: //link[@rel="alternate" and @hreflang="x-default"]/@href
selector: //a[span[text()="Profile"]]/@href
postProcess:
- replace:
- regex: ^
with: https://www.freeones.com
Twitter: //a[contains(@href,'twitter.com/')]/@href Twitter: //a[contains(@href,'twitter.com/')]/@href
Instagram: //a[contains(@href,'instagram.com/')]/@href Instagram: //a[contains(@href,'instagram.com/')]/@href
Birthdate: Birthdate:
selector: //span[contains(text(),'Born On')] selector: //span[contains(text(),'Born On')]
postProcess: postProcess:
- replace: - replace:
- regex: Born On - regex: Born On
with: with:
- parseDate: January 2, 2006 - parseDate: January 2, 2006
Ethnicity: Ethnicity:
selector: //a[@data-test="link_ethnicity"]/span/text() selector: //a[@data-test="link_ethnicity"]/span/text()
@@ -73,8 +68,8 @@ xPathScrapers:
selector: //span[text()='Height']/following-sibling::span/a selector: //span[text()='Height']/following-sibling::span/a
postProcess: postProcess:
- replace: - replace:
- regex: \D+[\s\S]+ - regex: \D+[\s\S]+
with: "" with: ""
- map: - map:
Unknown: "" Unknown: ""
Measurements: Measurements:
@@ -88,18 +83,18 @@ xPathScrapers:
postProcess: postProcess:
- map: - map:
Unknown: "" Unknown: ""
Fake: Yes Fake: "Yes"
Natural: No Natural: "No"
CareerLength: CareerLength:
selector: //div[contains(@class,'timeline-horizontal')]//p[@class='m-0'] selector: //div[contains(@class,'timeline-horizontal')]//p[@class='m-0']
concat: "-" concat: "-"
Aliases: //p[@data-test='p_aliases']/text() Aliases: //p[@data-test='p_aliases']/text()
Tattoos: Tattoos:
selector: //span[text()='Tattoos']/following-sibling::span/span selector: //span[text()='Tattoos']/following-sibling::span/span
postProcess: postProcess:
- map: - map:
Unknown: "" Unknown: ""
Piercings: Piercings:
selector: //span[text()='Piercings']/following-sibling::span/span selector: //span[text()='Piercings']/following-sibling::span/span
postProcess: postProcess:
- map: - map:
@@ -108,7 +103,7 @@ xPathScrapers:
selector: //div[contains(@class,'image-container')]//a/img/@src selector: //div[contains(@class,'image-container')]//a/img/@src
Gender: Gender:
fixed: "Female" fixed: "Female"
# Last updated January 31, 2021 # Last updated March 24, 2021
` `
func getFreeonesScraper() config { func getFreeonesScraper() config {