Skip to content

Instantly share code, notes, and snippets.

@rririanto
Created February 22, 2021 16:21
Show Gist options
  • Save rririanto/a623f66532f0b1104e6aec5664be358e to your computer and use it in GitHub Desktop.
Save rririanto/a623f66532f0b1104e6aec5664be358e to your computer and use it in GitHub Desktop.
Bypass & Scraping Websites that has CSS class names change frequently.
class_css = response.css('main[class^="D_"] ::attr(class)').getall()[12]
url = response.css('a[class^="%s"] ::attr(href)'% class_css).get()
print (url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment