Commit graph

27 commits

Author SHA1 Message Date
Pierre Mazière
1b3c8a8aeb [core + bridges] add BridgeAbstract::$inputs and BridgeAbstract::getInput()
Inputs are not stored in BridgeAbstract::$parameters anymore to separate
static data from dynamic data.
The getInput method allows for more readable code.

Also fix an "undefined index 'global'" notice

Probability of breaking bridges: high !

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-28 13:05:03 +02:00
Pierre Mazière
de1b39c8e5 [core + bridges] get rid of loadMetadata
if a bridge needs to modify some of the data that were initialized
there, ::__construct() should be used instead.

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-28 13:05:03 +02:00
Pierre Mazière
117031bf0f [core] store parameters values in BridgeAbstract::parameters
This way, any BridgeAbstract method can now have access to these values,
no only collectData

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-25 01:24:53 +02:00
Pierre Mazière
4a1f360d39 [bridges] use BridgeAbstract::getContents instead of file_get_contents
use of the proxy feature when enabled

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-22 23:39:40 +02:00
logmanoriginal
bf0a9d754e [bridges] Change all occurrences of the Item object to array 2016-08-22 18:55:59 +02:00
Pierre Mazière
f0e502ce37 [bridges] migrate all bridges to an array based definition of parameters
see github issue 356

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-22 01:25:56 +02:00
Pierre Mazière
bba216073c [bridges] remove useless 'update' property from all bridges
That's the source code manager job to keep this information
consistent

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-21 00:21:41 +02:00
Pierre Mazière
3c0d13c1bb bridges: use BridgeAbstract::getSimpleHTMLDOM
instead of BridgeAbstract::file_get_html

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:20:27 +02:00
logmanoriginal
74f0572d91 bridges: Replace returnError function with more specific
Replacements depend on original error code:
400: returnClientError
404: returnServerError
500: returnServerError
501: returnServerError
2016-08-17 14:45:08 +02:00
logmanoriginal
fa59a25229 bridges: Update bridges with 'required' attributes 2016-08-15 01:19:16 +02:00
logmanoriginal
42b6c82753 bridges: Cleanup occurrences of $item->thumbnailUri
This is a subsequent change to f3eefab
2016-08-09 15:50:55 +02:00
logmanoriginal
0ddf664d89 bridges: Remove obsolete getName() and getURI() 2016-08-06 18:45:02 +02:00
Pierre Mazière
955eecc299 use BridgeAbstract::file_get_html in all bridges
instead of simple_html_dom function file_get_html

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-06-25 23:17:42 +02:00
ORelio
96de64af63 [Facebook] Update field retrieval
Due to changes on their side.
Related issue: #253
2016-06-12 22:10:59 +02:00
logmanoriginal
3288328ff7 [Facebook] Update date in loadMetadatas 2016-03-31 11:45:35 +02:00
logmanoriginal
e62c6af62e [Facebook] Select page content one level further down
This fixes loading issues where feeds appeared empty.
2016-03-31 11:33:38 +02:00
ORelio
d16d514736 [Facebook] Capcha retrieval and response submit
This does not solve the captcha issue but allows the viewer to manually
solve the captcha by displaying a form and using the response from the
viewer. Maybe a first step to automated captcha solving?

This process relies on the use of a PHP session for storing captcha
details so that the user cannot submit anything else than the response
to the captcha. Response is filtered before being forwarded, also. Once
captcha is solved we get a page ready to be parsed, as usual.

Combined to some kind of OCR, this could automatically solve the
captcha, but currently if only automates the process of retrieving the
challenge and submitting the response.
2016-01-23 21:53:25 +01:00
Teromene
e582c887fb Ajout du paramètre pattern pour les entrées de type texte, ajout du required côté HTML.
Correction de la page d'accueuil pour qu'elle soit conforme aux standards du W3C.
Correction de la regex de listage des fichiers pour qu'elle ignore les sauvegardes.
Ajout d'un nettoyeur HTML, par défaut.
2015-12-06 15:56:39 +01:00
teromene
78c9dcc705 Last batch of bridges, all implemented !
Signed-off-by: teromene <teromene@teromene.fr>
2015-12-06 15:56:39 +01:00
teromene
5d2e7ac83d Ajout d'options multiples pour les méta-données.
Ajout d'un bridge de démonstration, DemoBridge.
Ajout d'un début de documentation pour créer un bridge dans CREATE_BRIDGE.md
2015-12-06 15:56:39 +01:00
ORelio
b592f8ebbf [Facebook] Convert textual emoticons to ASCII
Currently emoticons are retrived in textual form eg <i><u>smile
emoticon</u></i> which is not really visual... so let's convert them back
as ASCII emoticons eg ':)'. This works using a hardcoded table mapping
emoticon names to their visual representation, and the regular expression
match the two words because eg in french facebook will display
<i><u>émoticône smile</u></i> so we need to test both. Unknown emoticon
descriptions will be left as is.
2015-10-24 20:14:12 +02:00
ORelio
300b8bba9b [Facebook] More cleaning and bypass link redirect
Remove a bunch of useless html node properties
Bypass all l.php facebook link redirections
Restore <u> and <i> basic formatting
2015-10-23 12:18:55 +02:00
ORelio
d7436c2d0a Improve Facebook Bridge
Retrieve author display name from page title
Build short readable title using name and content
Convert relative links into absolute links
Remove attributes from </a> tags (may cause issues)
Remove onclick and onmouseover (javascript code)
Retrieve url of first image of post as thumnail
Use author avatar as thumnail if no first image
Use display name in feed name: name - Fb bridge
Minor code indent fixes and use simple quotes
2015-09-05 14:42:54 +02:00
teromene
ee4d4d9603 Ajout du support des journaux de profils 2015-09-02 13:49:36 +02:00
teromene
9dfa1d6f25 Ajout d'une URI par post 2015-09-01 00:04:13 +02:00
teromene
7680b065b5 Modification de la durée du cache 2015-08-31 23:02:11 +02:00
teromene
221ac239e1 Ajout d'un bridge pour Facebook 2015-08-31 22:59:08 +02:00