kopia lustrzana https://github.com/snarfed/bridgy-fed
rodzic
eade579cb6
commit
faf676e8bb
|
@ -1,7 +1,6 @@
|
|||
"""Handles requests for ActivityPub endpoints: actors, inbox, etc.
|
||||
"""
|
||||
import datetime
|
||||
import json
|
||||
import logging
|
||||
|
||||
import appengine_config
|
||||
|
@ -11,6 +10,7 @@ from granary import as2, microformats2
|
|||
import mf2util
|
||||
from oauth_dropins.webutil import util
|
||||
from oauth_dropins.webutil.handlers import memcache_response
|
||||
import ujson as json
|
||||
import webapp2
|
||||
|
||||
import common
|
||||
|
|
2
app.yaml
2
app.yaml
|
@ -19,6 +19,8 @@ libraries:
|
|||
version: latest
|
||||
- name: ssl
|
||||
version: latest
|
||||
- name: ujson
|
||||
version: latest
|
||||
- name: webob
|
||||
version: latest
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
"""
|
||||
from __future__ import unicode_literals
|
||||
import itertools
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
import urlparse
|
||||
|
@ -11,6 +10,7 @@ import urlparse
|
|||
from granary import as2
|
||||
from oauth_dropins.webutil import handlers, util
|
||||
import requests
|
||||
import ujson as json
|
||||
from webmentiontools import send
|
||||
from webob import exc
|
||||
|
||||
|
|
|
@ -9,13 +9,13 @@ https://github.com/snarfed/bridgy-fed/issues/16#issuecomment-424799599
|
|||
https://github.com/tootsuite/mastodon/pull/6219#issuecomment-429142747
|
||||
"""
|
||||
import datetime
|
||||
import json
|
||||
import logging
|
||||
|
||||
from granary import as2, microformats2
|
||||
import mf2util
|
||||
from oauth_dropins.webutil import util
|
||||
from oauth_dropins.webutil.handlers import memcache_response
|
||||
import ujson as json
|
||||
import webapp2
|
||||
|
||||
import appengine_config
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
# coding=utf-8
|
||||
"""Renders mf2 proxy pages based on stored Responses."""
|
||||
import datetime
|
||||
import json
|
||||
|
||||
import appengine_config
|
||||
|
||||
from granary import as2, atom, microformats2
|
||||
from oauth_dropins.webutil.handlers import memcache_response, ModernHandler
|
||||
from oauth_dropins.webutil import util
|
||||
import ujson as json
|
||||
import webapp2
|
||||
|
||||
from models import Response
|
||||
|
|
|
@ -53,6 +53,7 @@ soupsieve==1.9.4
|
|||
testtools==2.3.0
|
||||
traceback2==1.4.0
|
||||
tweepy==3.8.0
|
||||
ujson==1.35
|
||||
unittest2==1.1.0
|
||||
uritemplate==3.0.0
|
||||
urllib3==1.25.6
|
||||
|
|
|
@ -12,4 +12,5 @@ mox3>=0.24.0
|
|||
pycrypto
|
||||
requests==2.10.0
|
||||
requests-toolbelt==0.6.2
|
||||
ujson>=1.35
|
||||
urllib3>=1.14
|
||||
|
|
|
@ -5,13 +5,13 @@ TODO: test error handling
|
|||
"""
|
||||
from __future__ import unicode_literals
|
||||
import copy
|
||||
import json
|
||||
import urllib
|
||||
|
||||
from mock import call, patch
|
||||
from oauth_dropins.webutil import util
|
||||
from oauth_dropins.webutil.testutil import requests_response
|
||||
import requests
|
||||
import ujson as json
|
||||
|
||||
import activitypub
|
||||
from activitypub import app
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
# coding=utf-8
|
||||
"""Unit tests for common.py."""
|
||||
from __future__ import unicode_literals
|
||||
import json
|
||||
import logging
|
||||
|
||||
import mock
|
||||
from oauth_dropins.webutil import util
|
||||
from oauth_dropins.webutil.testutil import requests_response
|
||||
import requests
|
||||
import ujson as json
|
||||
from webob import exc
|
||||
|
||||
import common
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
# coding=utf-8
|
||||
"""Unit tests for render.py."""
|
||||
from __future__ import unicode_literals
|
||||
import json
|
||||
|
||||
import ujson as json
|
||||
|
||||
from models import Response
|
||||
import testutil
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
TODO: test error handling
|
||||
"""
|
||||
from __future__ import unicode_literals
|
||||
import json
|
||||
import urllib
|
||||
|
||||
import mock
|
||||
from oauth_dropins.webutil import util
|
||||
from oauth_dropins.webutil.testutil import requests_response
|
||||
import requests
|
||||
import ujson as json
|
||||
|
||||
import common
|
||||
import models
|
||||
|
|
|
@ -5,7 +5,6 @@ TODO: test error handling
|
|||
"""
|
||||
from __future__ import unicode_literals
|
||||
import copy
|
||||
import json
|
||||
import urllib
|
||||
import urllib2
|
||||
|
||||
|
@ -18,6 +17,7 @@ from mock import call
|
|||
from oauth_dropins.webutil import util
|
||||
from oauth_dropins.webutil.testutil import requests_response
|
||||
import requests
|
||||
import ujson as json
|
||||
|
||||
import activitypub
|
||||
from common import (
|
||||
|
|
|
@ -12,7 +12,6 @@ TODO: test:
|
|||
"""
|
||||
from __future__ import unicode_literals
|
||||
import datetime
|
||||
import json
|
||||
import logging
|
||||
import urllib
|
||||
import urlparse
|
||||
|
@ -21,6 +20,7 @@ import appengine_config
|
|||
|
||||
import mf2util
|
||||
from oauth_dropins.webutil import handlers, util
|
||||
import ujson as json
|
||||
import webapp2
|
||||
|
||||
import common
|
||||
|
|
|
@ -4,7 +4,6 @@ TODO tests:
|
|||
* actor/attributedTo could be string URL
|
||||
* salmon rel via webfinger via author.name + domain
|
||||
"""
|
||||
import json
|
||||
import logging
|
||||
import urllib
|
||||
import urlparse
|
||||
|
@ -20,6 +19,7 @@ from granary import as2, atom, microformats2, source
|
|||
import mf2util
|
||||
from oauth_dropins.webutil import util
|
||||
import requests
|
||||
import ujson as json
|
||||
import webapp2
|
||||
from webob import exc
|
||||
|
||||
|
@ -256,8 +256,7 @@ class WebmentionHandler(webapp2.RequestHandler):
|
|||
|
||||
feed = common.requests_get(atom_url).text
|
||||
parsed = feedparser.parse(feed)
|
||||
logging.info('Parsed: %s', json.dumps(parsed, indent=2,
|
||||
default=lambda key: '-'))
|
||||
logging.info('Parsed: %s', json.dumps(parsed, indent=2))
|
||||
entry = parsed.entries[0]
|
||||
target_id = entry.id
|
||||
in_reply_to = self.source_obj.get('inReplyTo')
|
||||
|
|
Ładowanie…
Reference in New Issue