Test new features for variables

This commit is contained in:
2023-08-22 00:56:52 +02:00
parent 89f3576881
commit 68b6e1c9fe
4 changed files with 48 additions and 19 deletions

View File

@ -2,10 +2,10 @@
const BeeWarehouse = require('../../BeeWarehouse.js');
let Arguments = { "Source": "profile.php?id=100043901540898" };
let FbLikebox = BeeWarehouse.LoadBeesFile('./FbLikebox.xml').FbLikebox;
let FbLikebox = BeeWarehouse.LoadBeesFile(`${__dirname}/FbLikebox.xml`).FbLikebox;
let Profile = ExampleCom.Functions.GetProfileInfo(Arguments);
let Profile = FbLikebox.Functions.GetProfileInfo(Arguments);
console.log(Profile);
let Posts = ExampleCom.Functions.GetLatestPosts(Arguments);
let Posts = FbLikebox.Functions.GetLatestPosts(Arguments);
console.log(Posts);

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<bees>
<bee name="FbLikebox" apiurl="https://www.facebook.com">
<set name="LikeboxUrl" value="/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2F{Source}&amp;stream=true&amp;_fb_noscript=1" arguments="Source">
<set name="LikeboxUrl" value="/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2F{Source}&amp;stream=true&amp;_fb_noscript=1"/>
<function name="GetProfileInfo" arguments="Source">
<request method="GET" path="{LikeboxUrl}" format="HTML">
@ -12,7 +12,7 @@
<function name="GetLatestPosts" arguments="Source">
<request method="GET" path="{LikeboxUrl}" format="HTML">
<items source="body" path="/html/body//div[@role='feed']/div/div/div[2]">
<set name="PostAnchor" value="./div[1]/div[2]/div[1]/div[2]/div/div/div[2]/a">
<set name="PostAnchor" value="./div[1]/div[2]/div[1]/div[2]/div/div/div[2]/a"/>
<value name="Message" source="body" path="./div[1]/div[2]/div[2]" key="text"/>
<value name="Media" source="body" path="./div[1]/div[1]//a/*[@src]" key="src"/>
<value name="Time" source="body" path="{PostAnchor}/abbr" key="data-utime"/>