instruction
stringlengths
0
1k
input
stringlengths
1
1k
output
stringlengths
10
6.51k
lines[1]]) ).strip() # Create the code snippet. cb = code_block_dark if theme == "dark" else code_block return cb( code=code, language=language, ) def docdemo( code: str, state: str | None = None, comp: rx.Component | None = None, context: bool = False, de...
# Wrap the render code in a function if needed. if context: code = f"""def index(): return {code} """ # Add the state code if state is not None: code = state + code if demobox_props.pop("toggle", False): return rx.tabs.root( rx.tabs.list( ...
if comp is None: comp = eval(code)
ip() # Create the code snippet. cb = code_block_dark if theme == "dark" else code_block return cb( code=code, language=language, ) def docdemo( code: str, state: str | None = None, comp: rx.Component | None = None, context: bool = False, demobox_props: dict[str, An...
# Wrap the render code in a function if needed. if context: code = f"""def index(): return {code} """ # Add the state code if state is not None: code = state + code if demobox_props.pop("toggle", False): return rx.tabs.root( rx.tabs.list( ...
comp = eval(code)
dark" else code_block return cb( code=code, language=language, ) def docdemo( code: str, state: str | None = None, comp: rx.Component | None = None, context: bool = False, demobox_props: dict[str, Any] | None = None, theme: str | None = None, **props, ) -> rx.Compon...
# Add the state code if state is not None: code = state + code if demobox_props.pop("toggle", False): return rx.tabs.root( rx.tabs.list( rx.tabs.trigger( rx.box( "UI", ), value=...
if context: code = f"""def index(): return {code} """
k return cb( code=code, language=language, ) def docdemo( code: str, state: str | None = None, comp: rx.Component | None = None, context: bool = False, demobox_props: dict[str, Any] | None = None, theme: str | None = None, **props, ) -> rx.Component: """Create a...
# Add the state code if state is not None: code = state + code if demobox_props.pop("toggle", False): return rx.tabs.root( rx.tabs.list( rx.tabs.trigger( rx.box( "UI", ), value=...
code = f"""def index(): return {code} """
code: str, state: str | None = None, comp: rx.Component | None = None, context: bool = False, demobox_props: dict[str, Any] | None = None, theme: str | None = None, **props, ) -> rx.Component: """Create a documentation demo with code and output. Args: code: The code to render th...
if demobox_props.pop("toggle", False): return rx.tabs.root( rx.tabs.list( rx.tabs.trigger( rx.box( "UI", ), value="tab1", class_name="tab-style", ), ...
if state is not None: code = state + code
ne = None, comp: rx.Component | None = None, context: bool = False, demobox_props: dict[str, Any] | None = None, theme: str | None = None, **props, ) -> rx.Component: """Create a documentation demo with code and output. Args: code: The code to render the component. state: Co...
if demobox_props.pop("toggle", False): return rx.tabs.root( rx.tabs.list( rx.tabs.trigger( rx.box( "UI", ), value="tab1", class_name="tab-style", ), ...
code = state + code
"""Template for documentation pages."""
icon_margins = { "h1": "10px", "h2": "5px", "h3": "2px", "h4": "0px", } def h_comp_common( text: str, heading: str, style: dict | None = None, mt: str = "4", class_name: str = "", ) -> rx.Component: id_ = text.lower().split(" ").join("-") href = rx.State.router.page.full_...
import reflex as rx
"""Template for documentation pages.""" import reflex as rx
def h_comp_common( text: str, heading: str, style: dict | None = None, mt: str = "4", class_name: str = "", ) -> rx.Component: id_ = text.lower().split(" ").join("-") href = rx.State.router.page.full_path + "#" + id_ return rx.link( rx.heading( text, i...
icon_margins = { "h1": "10px", "h2": "5px", "h3": "2px", "h4": "0px", }
"""Template for documentation pages.""" import reflex as rx icon_margins = { "h1": "10px", "h2": "5px", "h3": "2px", "h4": "0px", } def h_comp_common( text: str, heading: str, style: dict | None = None, mt: str = "4", class_name: str = "", ) -> rx.Component:
href = rx.State.router.page.full_path + "#" + id_ return rx.link( rx.heading( text, id=id_, as_=heading, style=style if style is not None else {}, class_name=class_name + " scroll-m-[5rem] mt-" + mt, ), rx.icon( ta...
id_ = text.lower().split(" ").join("-")
"""Template for documentation pages.""" import reflex as rx icon_margins = { "h1": "10px", "h2": "5px", "h3": "2px", "h4": "0px", } def h_comp_common( text: str, heading: str, style: dict | None = None, mt: str = "4", class_name: str = "", ) -> rx.Component: id_ = text.lower(...
return rx.link( rx.heading( text, id=id_, as_=heading, style=style if style is not None else {}, class_name=class_name + " scroll-m-[5rem] mt-" + mt, ), rx.icon( tag="link", size=18, class_name=...
href = rx.State.router.page.full_path + "#" + id_
5px", "h3": "2px", "h4": "0px", } def h_comp_common( text: str, heading: str, style: dict | None = None, mt: str = "4", class_name: str = "", ) -> rx.Component: id_ = text.lower().split(" ").join("-") href = rx.State.router.page.full_path + "#" + id_ return rx.link( rx...
@rx.memo def h1_comp_xd(text: list[str]) -> rx.Component: return h_comp_common( text=text[0], heading="h1", class_name="font-x-large lg:font-xx-large", ) @rx.memo def h2_comp(text: str) -> rx.Component: return h_comp_common( text=text, heading="h2", mt="8...
def h1_comp(text: str) -> rx.Component: return h_comp_common( text=text, heading="h1", class_name="font-x-large lg:font-xx-large", )
rx.Component: id_ = text.lower().split(" ").join("-") href = rx.State.router.page.full_path + "#" + id_ return rx.link( rx.heading( text, id=id_, as_=heading, style=style if style is not None else {}, class_name=class_name + " scroll-m-[5...
@rx.memo def h2_comp(text: str) -> rx.Component: return h_comp_common( text=text, heading="h2", mt="8", class_name="font-large lg:font-x-large", ) @rx.memo def h2_comp_xd(text: list[str]) -> rx.Component: return h_comp_common( text=text[0], heading="h2", ...
def h1_comp_xd(text: list[str]) -> rx.Component: return h_comp_common( text=text[0], heading="h1", class_name="font-x-large lg:font-xx-large", )
d_, as_=heading, style=style if style is not None else {}, class_name=class_name + " scroll-m-[5rem] mt-" + mt, ), rx.icon( tag="link", size=18, class_name="!text-violet-11 invisible transition-[visibility_0.075s_ease-out] group-hov...
@rx.memo def h2_comp_xd(text: list[str]) -> rx.Component: return h_comp_common( text=text[0], heading="h2", mt="8", class_name="font-large lg:font-x-large", ) @rx.memo def h3_comp(text: str) -> rx.Component: return h_comp_common( text=text, heading="h3", ...
def h2_comp(text: str) -> rx.Component: return h_comp_common( text=text, heading="h2", mt="8", class_name="font-large lg:font-x-large", )
ag="link", size=18, class_name="!text-violet-11 invisible transition-[visibility_0.075s_ease-out] group-hover:visible mt-" + mt, ), underline="none", href=href, on_click=lambda: rx.set_clipboard(href), # as_child=True, class_name="flex ...
@rx.memo def h3_comp(text: str) -> rx.Component: return h_comp_common( text=text, heading="h3", mt="4", class_name="font-large", ) @rx.memo def h3_comp_xd(text: list[str]) -> rx.Component: return h_comp_common( text=text[0], heading="h3", mt="4", ...
def h2_comp_xd(text: list[str]) -> rx.Component: return h_comp_common( text=text[0], heading="h2", mt="8", class_name="font-large lg:font-x-large", )
href=href, on_click=lambda: rx.set_clipboard(href), # as_child=True, class_name="flex flex-row items-center gap-6 hover:!text-violet-11 text-slate-12 cursor-pointer mb-2 transition-colors group", ) @rx.memo def h1_comp(text: str) -> rx.Component: return h_comp_common( ...
@rx.memo def h3_comp_xd(text: list[str]) -> rx.Component: return h_comp_common( text=text[0], heading="h3", mt="4", class_name="font-large", ) @rx.memo def h4_comp(text: str) -> rx.Component: return h_comp_common( text=text, heading="h4", mt="2", ...
def h3_comp(text: str) -> rx.Component: return h_comp_common( text=text, heading="h3", mt="4", class_name="font-large", )
-slate-12 cursor-pointer mb-2 transition-colors group", ) @rx.memo def h1_comp(text: str) -> rx.Component: return h_comp_common( text=text, heading="h1", class_name="font-x-large lg:font-xx-large", ) @rx.memo def h1_comp_xd(text: list[str]) -> rx.Component: return h_comp_comm...
@rx.memo def h4_comp(text: str) -> rx.Component: return h_comp_common( text=text, heading="h4", mt="2", class_name="font-md-smbold", ) @rx.memo def h4_comp_xd(text: list[str]) -> rx.Component: return h_comp_common( text=text[0], heading="h4", mt="...
def h3_comp_xd(text: list[str]) -> rx.Component: return h_comp_common( text=text[0], heading="h3", mt="4", class_name="font-large", )
class_name="font-x-large lg:font-xx-large", ) @rx.memo def h1_comp_xd(text: list[str]) -> rx.Component: return h_comp_common( text=text[0], heading="h1", class_name="font-x-large lg:font-xx-large", ) @rx.memo def h2_comp(text: str) -> rx.Component: return h_comp_common( ...
@rx.memo def h4_comp_xd(text: list[str]) -> rx.Component: return h_comp_common( text=text[0], heading="h4", mt="2", class_name="font-md-smbold", )
def h4_comp(text: str) -> rx.Component: return h_comp_common( text=text, heading="h4", mt="2", class_name="font-md-smbold", )
"h1", class_name="font-x-large lg:font-xx-large", ) @rx.memo def h2_comp(text: str) -> rx.Component: return h_comp_common( text=text, heading="h2", mt="8", class_name="font-large lg:font-x-large", ) @rx.memo def h2_comp_xd(text: list[str]) -> rx.Component: ret...
def h4_comp_xd(text: list[str]) -> rx.Component: return h_comp_common( text=text[0], heading="h4", mt="2", class_name="font-md-smbold", )
"""Typography blocks for doc pages."""
from pcweb.styles import fonts def definition(title: str, *children) -> rx.Component: """Create a definition for a doc page. Args: title: The title of the definition. children: The children to display. Returns: The styled definition. """ return rx.vstack( rx.hea...
import reflex as rx
"""Typography blocks for doc pages.""" import reflex as rx
def definition(title: str, *children) -> rx.Component: """Create a definition for a doc page. Args: title: The title of the definition. children: The children to display. Returns: The styled definition. """ return rx.vstack( rx.heading( title, font_si...
from pcweb.styles import fonts
"""Typography blocks for doc pages.""" import reflex as rx from pcweb.styles import fonts def definition(title: str, *children) -> rx.Component: """Create a definition for a doc page. Args: title: The title of the definition. children: The children to display. Returns: The styl...
@rx.memo def text_comp_2(text: rx.Var[str]) -> rx.Component: return rx.text(text, class_name="font-normal text-slate-12 max-w-[80%] mb-10") @rx.memo def list_comp(text: rx.Var[str]) -> rx.Component: return rx.list_item(text, class_name="font-normal text-slate-12 mb-4") @rx.memo def unordered_list_comp(it...
def text_comp(text: rx.Var[str]) -> rx.Component: return rx.text(text, class_name="font-normal text-slate-12 mb-4 leading-7")
locks for doc pages.""" import reflex as rx from pcweb.styles import fonts def definition(title: str, *children) -> rx.Component: """Create a definition for a doc page. Args: title: The title of the definition. children: The children to display. Returns: The styled definition. ...
@rx.memo def list_comp(text: rx.Var[str]) -> rx.Component: return rx.list_item(text, class_name="font-normal text-slate-12 mb-4") @rx.memo def unordered_list_comp(items: rx.Var[list[str]]) -> rx.Component: return rx.list.unordered(items, class_name="mb-6") @rx.memo def ordered_list_comp(items: rx.Var[lis...
def text_comp_2(text: rx.Var[str]) -> rx.Component: return rx.text(text, class_name="font-normal text-slate-12 max-w-[80%] mb-10")
e a definition for a doc page. Args: title: The title of the definition. children: The children to display. Returns: The styled definition. """ return rx.vstack( rx.heading( title, font_size="1em", font_weight="bold", color=rx.color("mauve", 12) ), ...
@rx.memo def unordered_list_comp(items: rx.Var[list[str]]) -> rx.Component: return rx.list.unordered(items, class_name="mb-6") @rx.memo def ordered_list_comp(items: rx.Var[list[str]]) -> rx.Component: return rx.list.ordered(items, class_name="mb-6") @rx.memo def code_comp(text: rx.Var[str]) -> rx.Compone...
def list_comp(text: rx.Var[str]) -> rx.Component: return rx.list_item(text, class_name="font-normal text-slate-12 mb-4")
turns: The styled definition. """ return rx.vstack( rx.heading( title, font_size="1em", font_weight="bold", color=rx.color("mauve", 12) ), *children, color=rx.color("mauve", 10), padding="1em", border=f"1px solid {rx.color('mauve', 4)}", ...
@rx.memo def ordered_list_comp(items: rx.Var[list[str]]) -> rx.Component: return rx.list.ordered(items, class_name="mb-6") @rx.memo def code_comp(text: rx.Var[str]) -> rx.Component: return rx.code(text, class_name="code-style") def doclink(text: str, href: str, **props) -> rx.Component: """Create a s...
def unordered_list_comp(items: rx.Var[list[str]]) -> rx.Component: return rx.list.unordered(items, class_name="mb-6")
ht="bold", color=rx.color("mauve", 12) ), *children, color=rx.color("mauve", 10), padding="1em", border=f"1px solid {rx.color('mauve', 4)}", background_color=rx.color("mauve", 2), border_radius="8px", _hover={ "border": f"1px solid {rx.color('m...
@rx.memo def code_comp(text: rx.Var[str]) -> rx.Component: return rx.code(text, class_name="code-style") def doclink(text: str, href: str, **props) -> rx.Component: """Create a styled link for doc pages. Args: text: The text to display. href: The link to go to. props: Props to ...
def ordered_list_comp(items: rx.Var[list[str]]) -> rx.Component: return rx.list.ordered(items, class_name="mb-6")
border=f"1px solid {rx.color('mauve', 4)}", background_color=rx.color("mauve", 2), border_radius="8px", _hover={ "border": f"1px solid {rx.color('mauve', 5)}", "background_color": rx.color("mauve", 3), }, align_items="start", ) @rx.memo def t...
def doclink(text: str, href: str, **props) -> rx.Component: """Create a styled link for doc pages. Args: text: The text to display. href: The link to go to. props: Props to apply to the link. Returns: The styled link. """ return rx.link( text, underline="...
def code_comp(text: rx.Var[str]) -> rx.Component: return rx.code(text, class_name="code-style")
import reflex as rx from pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs from pcweb.pages.docs import getting_started, hosting from pcweb.pages.docs.libr...
from datetime import datetime
from datetime import datetime
from pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs from pcweb.pages.docs import getting_started, hosting from pcweb.pages.docs.library import library fr...
import reflex as rx
from datetime import datetime import reflex as rx
from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs from pcweb.pages.docs import getting_started, hosting from pcweb.pages.docs.library import library from pcweb.pages.errors import errors from pcweb.page...
from pcweb.components.icons.icons import get_icon
from datetime import datetime import reflex as rx from pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, )
from pcweb.pages.docs import getting_started, hosting from pcweb.pages.docs.library import library from pcweb.pages.errors import errors from pcweb.pages.faq import faq from pcweb.pages.gallery import gallery from pcweb.pages.use_cases.use_cases import use_cases_page from pcweb.signup import IndexState def footer_li...
from pcweb.pages.blog import blogs
from datetime import datetime import reflex as rx from pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs
from pcweb.pages.docs.library import library from pcweb.pages.errors import errors from pcweb.pages.faq import faq from pcweb.pages.gallery import gallery from pcweb.pages.use_cases.use_cases import use_cases_page from pcweb.signup import IndexState def footer_link(text: str, href: str) -> rx.Component: return r...
from pcweb.pages.docs import getting_started, hosting
from datetime import datetime import reflex as rx from pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs from pcweb.pages.docs import getting_started, hosti...
from pcweb.pages.errors import errors from pcweb.pages.faq import faq from pcweb.pages.gallery import gallery from pcweb.pages.use_cases.use_cases import use_cases_page from pcweb.signup import IndexState def footer_link(text: str, href: str) -> rx.Component: return rx.link( text, href=href, ...
from pcweb.pages.docs.library import library
from datetime import datetime import reflex as rx from pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs from pcweb.pages.docs import getting_started, hosti...
from pcweb.pages.faq import faq from pcweb.pages.gallery import gallery from pcweb.pages.use_cases.use_cases import use_cases_page from pcweb.signup import IndexState def footer_link(text: str, href: str) -> rx.Component: return rx.link( text, href=href, class_name="font-small text-slate-...
from pcweb.pages.errors import errors
from datetime import datetime import reflex as rx from pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs from pcweb.pages.docs import getting_started, hosti...
from pcweb.pages.gallery import gallery from pcweb.pages.use_cases.use_cases import use_cases_page from pcweb.signup import IndexState def footer_link(text: str, href: str) -> rx.Component: return rx.link( text, href=href, class_name="font-small text-slate-9 hover:!text-slate-11 no-underl...
from pcweb.pages.faq import faq
from datetime import datetime import reflex as rx from pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs from pcweb.pages.docs import getting_started, hosti...
from pcweb.pages.use_cases.use_cases import use_cases_page from pcweb.signup import IndexState def footer_link(text: str, href: str) -> rx.Component: return rx.link( text, href=href, class_name="font-small text-slate-9 hover:!text-slate-11 no-underline transition-color", ) def foote...
from pcweb.pages.gallery import gallery
from datetime import datetime import reflex as rx from pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs from pcweb.pages.docs import getting_started, hosti...
from pcweb.signup import IndexState def footer_link(text: str, href: str) -> rx.Component: return rx.link( text, href=href, class_name="font-small text-slate-9 hover:!text-slate-11 no-underline transition-color", ) def footer_link_flex(heading: str, links: list[rx.Component]) -> rx....
from pcweb.pages.use_cases.use_cases import use_cases_page
from datetime import datetime import reflex as rx from pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs from pcweb.pages.docs import getting_started, hosti...
def footer_link(text: str, href: str) -> rx.Component: return rx.link( text, href=href, class_name="font-small text-slate-9 hover:!text-slate-11 no-underline transition-color", ) def footer_link_flex(heading: str, links: list[rx.Component]) -> rx.Component: return rx.box( ...
from pcweb.signup import IndexState
from datetime import datetime import reflex as rx from pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs from pcweb.pages.docs import getting_started, hosti...
def footer_link_flex(heading: str, links: list[rx.Component]) -> rx.Component: return rx.box( rx.el.h4( heading, class_name="font-smbold text-slate-12", ), *links, class_name="flex flex-col gap-4", ) def social_menu_item(icon: str, url: str = "/", cla...
def footer_link(text: str, href: str) -> rx.Component: return rx.link( text, href=href, class_name="font-small text-slate-9 hover:!text-slate-11 no-underline transition-color", )
from datetime import datetime import reflex as rx from pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs from pcweb.pages.docs import getting_started, hosti...
def social_menu_item(icon: str, url: str = "/", class_name: str = "") -> rx.Component: return rx.link( get_icon(icon=icon), class_name="flex justify-center items-center gap-2 bg-slate-1 hover:bg-slate-3 p-[0.125rem_0.75rem] text-slate-9 hover:!text-slate-9 transition-bg cursor-pointer overflow-hi...
def footer_link_flex(heading: str, links: list[rx.Component]) -> rx.Component: return rx.box( rx.el.h4( heading, class_name="font-smbold text-slate-12", ), *links, class_name="flex flex-col gap-4", )
om pcweb.components.icons.icons import get_icon from pcweb.constants import ( DISCORD_URL, FORUM_URL, GITHUB_URL, LINKEDIN_URL, ROADMAP_URL, TWITTER_URL, ) from pcweb.pages.blog import blogs from pcweb.pages.docs import getting_started, hosting from pcweb.pages.docs.library import library from p...
def menu_socials() -> rx.Component: return rx.box( rx.box( social_menu_item("github", GITHUB_URL), social_menu_item( "twitter", TWITTER_URL, class_name="border-l border-slate-5 border-solid border-y-0 border-r-0", ), ...
def social_menu_item(icon: str, url: str = "/", class_name: str = "") -> rx.Component: return rx.link( get_icon(icon=icon), class_name="flex justify-center items-center gap-2 bg-slate-1 hover:bg-slate-3 p-[0.125rem_0.75rem] text-slate-9 hover:!text-slate-9 transition-bg cursor-pointer overflow-hidde...
input_email", type="email", class_name="box-border border-slate-5 focus:border-violet-9 focus:border-1 bg-white-1 p-[0.5rem_0.75rem] border rounded-[10px] font-small text-slate-11 placeholder:text-slate-9 outline-none focus:outline-none", )...
@rx.memo def footer() -> rx.Component: from pcweb.pages.framework.views.footer_index import dark_mode_toggle return rx.el.footer( rx.box( rx.box( rx.box( menu_socials(), ph_1(), class_name="flex flex-col gap-6", ...
def ph_1() -> rx.Component: return rx.fragment( rx.image( src="/logos/dark/ph_1.svg", class_name="hidden dark:block h-[40px] w-fit", alt="1st product of the day logo", ), rx.image( src="/logos/light/ph_1.svg", class_name="dark:hidde...
class_name="flex justify-center items-center bg-slate-4 hover:bg-slate-5 p-[0.5rem_0.875rem] rounded-[10px] font-smbold text-slate-9 transition-bg cursor-pointer", ), as_child=True, ), clas...
return rx.el.footer( rx.box( rx.box( rx.box( menu_socials(), ph_1(), class_name="flex flex-col gap-6", ), rx.text( f"© {datetime.now().year} Pynecone, Inc.", ...
from pcweb.pages.framework.views.footer_index import dark_mode_toggle
from pcweb.views.bottom_section.get_started import get_started from pcweb.views.bottom_section.newsletter import newsletter @rx.memo def bottom_section() -> rx.Component: return rx.box( newsletter(), get_started(), class_name="flex flex-col items-center gap-20 lg:gap-32 pt-8 lg:pt-[6.5re...
import reflex as rx
import reflex_ui as ui from pcweb.components.hint import hint from pcweb.components.icons.icons import get_icon from pcweb.pages.docs import getting_started def code_block() -> rx.Component: return rx.box( # Glow rx.html( """<svg xmlns="http://www.w3.org/2000/svg" width="598" height=...
import reflex as rx
import reflex as rx
from pcweb.components.hint import hint from pcweb.components.icons.icons import get_icon from pcweb.pages.docs import getting_started def code_block() -> rx.Component: return rx.box( # Glow rx.html( """<svg xmlns="http://www.w3.org/2000/svg" width="598" height="247" viewBox="0 0 598 ...
import reflex_ui as ui
import reflex as rx import reflex_ui as ui
from pcweb.components.icons.icons import get_icon from pcweb.pages.docs import getting_started def code_block() -> rx.Component: return rx.box( # Glow rx.html( """<svg xmlns="http://www.w3.org/2000/svg" width="598" height="247" viewBox="0 0 598 247" fill="none"> <path d="M598 123.5C...
from pcweb.components.hint import hint
import reflex as rx import reflex_ui as ui from pcweb.components.hint import hint
from pcweb.pages.docs import getting_started def code_block() -> rx.Component: return rx.box( # Glow rx.html( """<svg xmlns="http://www.w3.org/2000/svg" width="598" height="247" viewBox="0 0 598 247" fill="none"> <path d="M598 123.5C598 191.707 464.133 247 299 247C133.867 247 0 191....
from pcweb.components.icons.icons import get_icon
import reflex as rx import reflex_ui as ui from pcweb.components.hint import hint from pcweb.components.icons.icons import get_icon
def code_block() -> rx.Component: return rx.box( # Glow rx.html( """<svg xmlns="http://www.w3.org/2000/svg" width="598" height="247" viewBox="0 0 598 247" fill="none"> <path d="M598 123.5C598 191.707 464.133 247 299 247C133.867 247 0 191.707 0 123.5C0 55.2928 133.867 0 299 0C464.133...
from pcweb.pages.docs import getting_started
from pcweb.components.button import button from pcweb.signup import IndexState def newletter_input() -> rx.Component: return rx.box( rx.cond( IndexState.signed_up, rx.box( rx.box( rx.icon( tag="circle-check", ...
import reflex as rx
import reflex as rx
from pcweb.signup import IndexState def newletter_input() -> rx.Component: return rx.box( rx.cond( IndexState.signed_up, rx.box( rx.box( rx.icon( tag="circle-check", size=16, ...
from pcweb.components.button import button
import reflex as rx from pcweb.components.button import button
def newletter_input() -> rx.Component: return rx.box( rx.cond( IndexState.signed_up, rx.box( rx.box( rx.icon( tag="circle-check", size=16, class_name="!text-violet-9", ...
from pcweb.signup import IndexState
1.4375rem] h-[5.5625rem] -translate-y-1/2 right-[-2.5rem] top-1/2 z-[-1]", ), button( "Subscribe", type="submit", variant="muted", ), class_name="relative", ...
def newsletter() -> rx.Component: return rx.el.section( newsletter_card(), class_name="flex items-center justify-center w-full", )
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """
import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup class DeadLinkChecker: def __init__(self, base_url, max_pages=None, timeout=10, delay=0.5): self.base_url = base_url.rstrip("/"...
import argparse
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse
import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup class DeadLinkChecker: def __init__(self, base_url, max_pages=None, timeout=10, delay=0.5): self.base_url = base_url.rstrip("/") s...
import sys
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time
from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup class DeadLinkChecker: def __init__(self, base_url, max_pages=None, timeout=10, delay=0.5): self.base_url = base_url.rstrip("/") self.domain = urlparse(base_url).netloc ...
import xml.etree.ElementTree as ET
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET
from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup class DeadLinkChecker: def __init__(self, base_url, max_pages=None, timeout=10, delay=0.5): self.base_url = base_url.rstrip("/") self.domain = urlparse(base_url).netloc self.max_pages = max_pages ...
from collections import deque
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque
import requests from bs4 import BeautifulSoup class DeadLinkChecker: def __init__(self, base_url, max_pages=None, timeout=10, delay=0.5): self.base_url = base_url.rstrip("/") self.domain = urlparse(base_url).netloc self.max_pages = max_pages self.timeout = timeout self.de...
from urllib.parse import urljoin, urlparse
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse
from bs4 import BeautifulSoup class DeadLinkChecker: def __init__(self, base_url, max_pages=None, timeout=10, delay=0.5): self.base_url = base_url.rstrip("/") self.domain = urlparse(base_url).netloc self.max_pages = max_pages self.timeout = timeout self.delay = delay ...
import requests
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests
class DeadLinkChecker: def __init__(self, base_url, max_pages=None, timeout=10, delay=0.5): self.base_url = base_url.rstrip("/") self.domain = urlparse(base_url).netloc self.max_pages = max_pages self.timeout = timeout self.delay = delay self.visited_pages = set()...
from bs4 import BeautifulSoup
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup...
def is_internal_url(self, url): """Check if URL is internal to our domain.""" parsed = urlparse(url) return parsed.netloc == self.domain or parsed.netloc == "" def normalize_url(self, url): """Normalize URL for comparison.""" parsed = urlparse(url) normalized =...
def __init__(self, base_url, max_pages=None, timeout=10, delay=0.5): self.base_url = base_url.rstrip("/") self.domain = urlparse(base_url).netloc self.max_pages = max_pages self.timeout = timeout self.delay = delay self.visited_pages = set() self.checked_links = ...
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup...
self.domain = urlparse(base_url).netloc self.max_pages = max_pages self.timeout = timeout self.delay = delay self.visited_pages = set() self.checked_links = set() self.dead_links = [] self.pages_to_visit = deque([base_url]) self.session = reques...
self.base_url = base_url.rstrip("/")
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup...
self.max_pages = max_pages self.timeout = timeout self.delay = delay self.visited_pages = set() self.checked_links = set() self.dead_links = [] self.pages_to_visit = deque([base_url]) self.session = requests.Session() self.session.headers.update...
self.domain = urlparse(base_url).netloc
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup...
self.timeout = timeout self.delay = delay self.visited_pages = set() self.checked_links = set() self.dead_links = [] self.pages_to_visit = deque([base_url]) self.session = requests.Session() self.session.headers.update( {"User-Agent": "Mozil...
self.max_pages = max_pages
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup...
self.delay = delay self.visited_pages = set() self.checked_links = set() self.dead_links = [] self.pages_to_visit = deque([base_url]) self.session = requests.Session() self.session.headers.update( {"User-Agent": "Mozilla/5.0 (compatible; DeadLinkChe...
self.timeout = timeout
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup...
self.visited_pages = set() self.checked_links = set() self.dead_links = [] self.pages_to_visit = deque([base_url]) self.session = requests.Session() self.session.headers.update( {"User-Agent": "Mozilla/5.0 (compatible; DeadLinkChecker/1.0)"} ) ...
self.delay = delay
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup...
self.checked_links = set() self.dead_links = [] self.pages_to_visit = deque([base_url]) self.session = requests.Session() self.session.headers.update( {"User-Agent": "Mozilla/5.0 (compatible; DeadLinkChecker/1.0)"} ) def is_internal_url(self, url): ...
self.visited_pages = set()
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup...
self.dead_links = [] self.pages_to_visit = deque([base_url]) self.session = requests.Session() self.session.headers.update( {"User-Agent": "Mozilla/5.0 (compatible; DeadLinkChecker/1.0)"} ) def is_internal_url(self, url): """Check if URL is internal to ...
self.checked_links = set()
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup...
self.pages_to_visit = deque([base_url]) self.session = requests.Session() self.session.headers.update( {"User-Agent": "Mozilla/5.0 (compatible; DeadLinkChecker/1.0)"} ) def is_internal_url(self, url): """Check if URL is internal to our domain.""" parsed...
self.dead_links = []
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup...
self.session = requests.Session() self.session.headers.update( {"User-Agent": "Mozilla/5.0 (compatible; DeadLinkChecker/1.0)"} ) def is_internal_url(self, url): """Check if URL is internal to our domain.""" parsed = urlparse(url) return parsed.netloc ==...
self.pages_to_visit = deque([base_url])
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup...
self.session.headers.update( {"User-Agent": "Mozilla/5.0 (compatible; DeadLinkChecker/1.0)"} ) def is_internal_url(self, url): """Check if URL is internal to our domain.""" parsed = urlparse(url) return parsed.netloc == self.domain or parsed.netloc == "" de...
self.session = requests.Session()
#!/usr/bin/env python3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup...
def normalize_url(self, url): """Normalize URL for comparison.""" parsed = urlparse(url) normalized = f"{parsed.scheme}://{parsed.netloc}{parsed.path}" if parsed.query: normalized += f"?{parsed.query}" return normalized def check_link(self, url, source_page...
def is_internal_url(self, url): """Check if URL is internal to our domain.""" parsed = urlparse(url) return parsed.netloc == self.domain or parsed.netloc == ""
hon3 """Dead link checker for the Reflex website. Crawls the deployed site and checks for broken links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup class DeadLinkC...
return parsed.netloc == self.domain or parsed.netloc == "" def normalize_url(self, url): """Normalize URL for comparison.""" parsed = urlparse(url) normalized = f"{parsed.scheme}://{parsed.netloc}{parsed.path}" if parsed.query: normalized += f"?{parsed.query}" ...
parsed = urlparse(url)
n links. """ import argparse import sys import time import xml.etree.ElementTree as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup class DeadLinkChecker: def __init__(self, base_url, max_pages=None, timeout=10, delay=0.5): self.b...
def check_link(self, url, source_page): """Check if a single link is working.""" if url in self.checked_links: return True self.checked_links.add(url) parsed = urlparse(url) if parsed.netloc in ["fonts.googleapis.com", "fonts.gstatic.com"]: return ...
def normalize_url(self, url): """Normalize URL for comparison.""" parsed = urlparse(url) normalized = f"{parsed.scheme}://{parsed.netloc}{parsed.path}" if parsed.query: normalized += f"?{parsed.query}" return normalized
as ET from collections import deque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup class DeadLinkChecker: def __init__(self, base_url, max_pages=None, timeout=10, delay=0.5): self.base_url = base_url.rstrip("/") self.domain = urlparse(base_url).netloc ...
normalized = f"{parsed.scheme}://{parsed.netloc}{parsed.path}" if parsed.query: normalized += f"?{parsed.query}" return normalized def check_link(self, url, source_page): """Check if a single link is working.""" if url in self.checked_links: return T...
parsed = urlparse(url)
eque from urllib.parse import urljoin, urlparse import requests from bs4 import BeautifulSoup class DeadLinkChecker: def __init__(self, base_url, max_pages=None, timeout=10, delay=0.5): self.base_url = base_url.rstrip("/") self.domain = urlparse(base_url).netloc self.max_pages = max_pages...
if parsed.query: normalized += f"?{parsed.query}" return normalized def check_link(self, url, source_page): """Check if a single link is working.""" if url in self.checked_links: return True self.checked_links.add(url) parsed = urlparse(url...
normalized = f"{parsed.scheme}://{parsed.netloc}{parsed.path}"
s4 import BeautifulSoup class DeadLinkChecker: def __init__(self, base_url, max_pages=None, timeout=10, delay=0.5): self.base_url = base_url.rstrip("/") self.domain = urlparse(base_url).netloc self.max_pages = max_pages self.timeout = timeout self.delay = delay sel...
return normalized def check_link(self, url, source_page): """Check if a single link is working.""" if url in self.checked_links: return True self.checked_links.add(url) parsed = urlparse(url) if parsed.netloc in ["fonts.googleapis.com", "fonts.gstatic....
if parsed.query: normalized += f"?{parsed.query}"
rlparse(base_url).netloc self.max_pages = max_pages self.timeout = timeout self.delay = delay self.visited_pages = set() self.checked_links = set() self.dead_links = [] self.pages_to_visit = deque([base_url]) self.session = requests.Session() sel...
self.checked_links.add(url) parsed = urlparse(url) if parsed.netloc in ["fonts.googleapis.com", "fonts.gstatic.com"]: return True try: response = self.session.head( url, timeout=self.timeout, allow_redirects=True ) if r...
if url in self.checked_links: return True
.visited_pages = set() self.checked_links = set() self.dead_links = [] self.pages_to_visit = deque([base_url]) self.session = requests.Session() self.session.headers.update( {"User-Agent": "Mozilla/5.0 (compatible; DeadLinkChecker/1.0)"} ) def is_interna...
try: response = self.session.head( url, timeout=self.timeout, allow_redirects=True ) if response.status_code == 405: response = self.session.get( url, timeout=self.timeout, allow_redirects=True ) ...
if parsed.netloc in ["fonts.googleapis.com", "fonts.gstatic.com"]: return True
deque([base_url]) self.session = requests.Session() self.session.headers.update( {"User-Agent": "Mozilla/5.0 (compatible; DeadLinkChecker/1.0)"} ) def is_internal_url(self, url): """Check if URL is internal to our domain.""" parsed = urlparse(url) return...
if response.status_code == 405: response = self.session.get( url, timeout=self.timeout, allow_redirects=True ) if response.status_code == 403 and parsed.netloc in [ "twitter.com", "www.twitter.com", ...
response = self.session.head( url, timeout=self.timeout, allow_redirects=True )
t": "Mozilla/5.0 (compatible; DeadLinkChecker/1.0)"} ) def is_internal_url(self, url): """Check if URL is internal to our domain.""" parsed = urlparse(url) return parsed.netloc == self.domain or parsed.netloc == "" def normalize_url(self, url): """Normalize URL for comp...
if response.status_code == 403 and parsed.netloc in [ "twitter.com", "www.twitter.com", "x.com", "www.x.com", ]: print(f"Warning: Twitter/X link may be blocked by bot detection: {url}") return True ...
if response.status_code == 405: response = self.session.get( url, timeout=self.timeout, allow_redirects=True )
0)"} ) def is_internal_url(self, url): """Check if URL is internal to our domain.""" parsed = urlparse(url) return parsed.netloc == self.domain or parsed.netloc == "" def normalize_url(self, url): """Normalize URL for comparison.""" parsed = urlparse(url) ...
if response.status_code == 403 and parsed.netloc in [ "twitter.com", "www.twitter.com", "x.com", "www.x.com", ]: print(f"Warning: Twitter/X link may be blocked by bot detection: {url}") return True ...
response = self.session.get( url, timeout=self.timeout, allow_redirects=True )
rse(url) return parsed.netloc == self.domain or parsed.netloc == "" def normalize_url(self, url): """Normalize URL for comparison.""" parsed = urlparse(url) normalized = f"{parsed.scheme}://{parsed.netloc}{parsed.path}" if parsed.query: normalized += f"?{parsed.q...
if response.status_code >= 400: self.dead_links.append( { "url": url, "status_code": response.status_code, "source_page": source_page, "error": f"HTTP {response.status_code}"...
if response.status_code == 403 and parsed.netloc in [ "twitter.com", "www.twitter.com", "x.com", "www.x.com", ]: print(f"Warning: Twitter/X link may be blocked by bot detection: {url}") return True
query}" return normalized def check_link(self, url, source_page): """Check if a single link is working.""" if url in self.checked_links: return True self.checked_links.add(url) parsed = urlparse(url) if parsed.netloc in ["fonts.googleapis.com", "fonts.g...
except requests.exceptions.RequestException as e: self.dead_links.append( { "url": url, "status_code": None, "source_page": source_page, "error": str(e), } ) retu...
if response.status_code >= 400: self.dead_links.append( { "url": url, "status_code": response.status_code, "source_page": source_page, "error": f"HTTP {response.status_code}", ...
n [ "twitter.com", "www.twitter.com", "x.com", "www.x.com", ]: print(f"Warning: Twitter/X link may be blocked by bot detection: {url}") return True if response.status_code >= 400: sel...
def crawl_page(self, url): """Crawl a single page and extract links.""" if url in self.visited_pages or ( self.max_pages and len(self.visited_pages) >= self.max_pages ): return [] self.visited_pages.add(url) print(f"Crawling: {url}") try: ...
def extract_links(self, html, page_url): """Extract all links from HTML content.""" soup = BeautifulSoup(html, "html.parser") links = [] for tag in soup.find_all(["a", "link", "img", "script"]): url = None if tag.name == "a" or tag.name == "link": ...
"www.x.com", ]: print(f"Warning: Twitter/X link may be blocked by bot detection: {url}") return True if response.status_code >= 400: self.dead_links.append( { "url": url, ...
links = [] for tag in soup.find_all(["a", "link", "img", "script"]): url = None if tag.name == "a" or tag.name == "link": url = tag.get("href") elif tag.name == "img" or tag.name == "script": url = tag.get("src") if url: ...
soup = BeautifulSoup(html, "html.parser")
print(f"Warning: Twitter/X link may be blocked by bot detection: {url}") return True if response.status_code >= 400: self.dead_links.append( { "url": url, "status_code": response.status_code, ...
for tag in soup.find_all(["a", "link", "img", "script"]): url = None if tag.name == "a" or tag.name == "link": url = tag.get("href") elif tag.name == "img" or tag.name == "script": url = tag.get("src") if url: abs...
links = []
: Twitter/X link may be blocked by bot detection: {url}") return True if response.status_code >= 400: self.dead_links.append( { "url": url, "status_code": response.status_code, "sourc...
return links def crawl_page(self, url): """Crawl a single page and extract links.""" if url in self.visited_pages or ( self.max_pages and len(self.visited_pages) >= self.max_pages ): return [] self.visited_pages.add(url) print(f"Crawling: {...
for tag in soup.find_all(["a", "link", "img", "script"]): url = None if tag.name == "a" or tag.name == "link": url = tag.get("href") elif tag.name == "img" or tag.name == "script": url = tag.get("src") if url: absolute_url ...
return True if response.status_code >= 400: self.dead_links.append( { "url": url, "status_code": response.status_code, "source_page": source_page, "error": f"HTTP {respons...
if tag.name == "a" or tag.name == "link": url = tag.get("href") elif tag.name == "img" or tag.name == "script": url = tag.get("src") if url: absolute_url = urljoin(page_url, url) if not absolute_url.startswith(("javasc...
url = None
if response.status_code >= 400: self.dead_links.append( { "url": url, "status_code": response.status_code, "source_page": source_page, "error": f"HTTP {response.status_code}", ...
if url: absolute_url = urljoin(page_url, url) if not absolute_url.startswith(("javascript:", "mailto:", "tel:")): links.append(absolute_url) return links def crawl_page(self, url): """Crawl a single page and extract links.""" ...
if tag.name == "a" or tag.name == "link": url = tag.get("href") elif tag.name == "img" or tag.name == "script": url = tag.get("src")
.dead_links.append( { "url": url, "status_code": response.status_code, "source_page": source_page, "error": f"HTTP {response.status_code}", } ) return F...
elif tag.name == "img" or tag.name == "script": url = tag.get("src") if url: absolute_url = urljoin(page_url, url) if not absolute_url.startswith(("javascript:", "mailto:", "tel:")): links.append(absolute_url) return ...
url = tag.get("href")
{ "url": url, "status_code": response.status_code, "source_page": source_page, "error": f"HTTP {response.status_code}", } ) return False except requests.exce...
if url: absolute_url = urljoin(page_url, url) if not absolute_url.startswith(("javascript:", "mailto:", "tel:")): links.append(absolute_url) return links def crawl_page(self, url): """Crawl a single page and extract links.""" ...
elif tag.name == "img" or tag.name == "script": url = tag.get("src")
"status_code": response.status_code, "source_page": source_page, "error": f"HTTP {response.status_code}", } ) return False except requests.exceptions.RequestException as e: self.dead_links.append...
if url: absolute_url = urljoin(page_url, url) if not absolute_url.startswith(("javascript:", "mailto:", "tel:")): links.append(absolute_url) return links def crawl_page(self, url): """Crawl a single page and extract links.""" ...
url = tag.get("src")
_code, "source_page": source_page, "error": f"HTTP {response.status_code}", } ) return False except requests.exceptions.RequestException as e: self.dead_links.append( { ...
return links def crawl_page(self, url): """Crawl a single page and extract links.""" if url in self.visited_pages or ( self.max_pages and len(self.visited_pages) >= self.max_pages ): return [] self.visited_pages.add(url) print(f"Crawling: {...
if url: absolute_url = urljoin(page_url, url) if not absolute_url.startswith(("javascript:", "mailto:", "tel:")): links.append(absolute_url)
"source_page": source_page, "error": f"HTTP {response.status_code}", } ) return False except requests.exceptions.RequestException as e: self.dead_links.append( { "url": url, ...
if not absolute_url.startswith(("javascript:", "mailto:", "tel:")): links.append(absolute_url) return links def crawl_page(self, url): """Crawl a single page and extract links.""" if url in self.visited_pages or ( self.max_pages and len(self...
absolute_url = urljoin(page_url, url)
"error": f"HTTP {response.status_code}", } ) return False except requests.exceptions.RequestException as e: self.dead_links.append( { "url": url, "status_code": None, ...
return links def crawl_page(self, url): """Crawl a single page and extract links.""" if url in self.visited_pages or ( self.max_pages and len(self.visited_pages) >= self.max_pages ): return [] self.visited_pages.add(url) print(f"Crawling: {...
if not absolute_url.startswith(("javascript:", "mailto:", "tel:")): links.append(absolute_url)
"url": url, "status_code": None, "source_page": source_page, "error": str(e), } ) return False return True def extract_links(self, html, page_url): """Extract all links from HTML c...
self.visited_pages.add(url) print(f"Crawling: {url}") try: response = self.session.get(url, timeout=self.timeout) response.raise_for_status() content_type = response.headers.get("content-type", "").lower() if "text/html" not in content_type: ...
if url in self.visited_pages or ( self.max_pages and len(self.visited_pages) >= self.max_pages ): return []
def extract_links(self, html, page_url): """Extract all links from HTML content.""" soup = BeautifulSoup(html, "html.parser") links = [] for tag in soup.find_all(["a", "link", "img", "script"]): url = None if tag.name == "a" or tag.name == "link": ...
response.raise_for_status() content_type = response.headers.get("content-type", "").lower() if "text/html" not in content_type: return [] links = self.extract_links(response.text, url) for link in links: self.check_link(link...
response = self.session.get(url, timeout=self.timeout)
BeautifulSoup(html, "html.parser") links = [] for tag in soup.find_all(["a", "link", "img", "script"]): url = None if tag.name == "a" or tag.name == "link": url = tag.get("href") elif tag.name == "img" or tag.name == "script": url = t...
if "text/html" not in content_type: return [] links = self.extract_links(response.text, url) for link in links: self.check_link(link, url) if self.is_internal_url(link): normalized = self.normalize_url(link) ...
content_type = response.headers.get("content-type", "").lower()
oup.find_all(["a", "link", "img", "script"]): url = None if tag.name == "a" or tag.name == "link": url = tag.get("href") elif tag.name == "img" or tag.name == "script": url = tag.get("src") if url: absolute_url = urljoin(pa...
links = self.extract_links(response.text, url) for link in links: self.check_link(link, url) if self.is_internal_url(link): normalized = self.normalize_url(link) if normalized not in self.visited_pages: ...
if "text/html" not in content_type: return []
if tag.name == "a" or tag.name == "link": url = tag.get("href") elif tag.name == "img" or tag.name == "script": url = tag.get("src") if url: absolute_url = urljoin(page_url, url) if not absolute_url.startswith(("javascript:",...
for link in links: self.check_link(link, url) if self.is_internal_url(link): normalized = self.normalize_url(link) if normalized not in self.visited_pages: self.pages_to_visit.append(normalized) t...
links = self.extract_links(response.text, url)