bovine.clients.web
This module contains methods to parse a webpage and turn it into an ActivityPub object.
bovine.clients.web
RobotFileDeniesAccess
Bases: Exception
Used to indicate that robots.txt does not allow the user agent to access the url being queried
WebPage
dataclass
Class to capture loading webpages and transforming their content in objects more usable in the Fediverse.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
URL of the webpage |
required |
text
|
str | None
|
|
None
|
linked_ld
|
list
|
Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. |
<dynamic>
|
Source code in bovine/bovine/clients/web/__init__.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|
jsonld
cached
property
open_graph_page
cached
property
open_graph_page: dict
Creates an ActivityPub Page object from the Open Graph data
fetch
async
fetch(
session: ClientSession | None = None,
fetch_linked_ld=False,
)
Fetches the webpage and transform its content using BeautifulSoup